IIRC CentOS usually lacks a /etc/hostname file so it doesn’t attempt to set it on boot, whereas all Debian derivatives are required to have a /etc/hostname file which is written to /proc/sys/kernel/hostname at boot time and so replaces the preset uts value.
Hey, @stgraber ! Nice to see you again
So, in other words i can’t change hostname with lxc.uts.name ? Maybe there are some other methods/variables to do that?
Normally there’s no need for that because /etc/hostname is a templated file so when the container gets created, the container name is put in /etc/hostname.
As Debian/Ubuntu always have a /etc/hostname file, I’m reasonably sure that it’s a bad idea to remove it and certainly not something we’d be willing to do by default.
oh, ofc i don’t ask you to change ur script on mainstream. I copied the lxc-download to lxc-test with my local changes and it’s pretty enough 4 me. Anyway i understood the idea. Thx u so much 4 ur time!