I have an OvZ VPS. There's three IPs (venet0:0 through venet0:2).
I want the VPS's hostname to be the IP associated with venet0:2
So I change /etc/hosts, remove the venet0:0 IP, and put an entry for venet0:2
But when I reboot, I get:
# Auto-generated hostname. Please do not remove this comment.
And the venet0:0 hostname is back.
This is CentOS. There's no dhcp in the the ifcfg-eth* scripts, a grep -R for "Auto-generated" in /etc didn't show anything...
Is this something that OvZ does outside the container?
If so, is the best course of action to have a local init script that replaces /etc/hosts at the end of startup with what I want?