Re: hostname drops off between remote sessions
On Mon, Jan 23, 2017 at 12:33:55PM -0500, Tony Baldwin wrote:
> Perhaps it is these Daemons that are not doing their job(?), because
> I'll set the hostname (as root with "hostname $myhostname", or editing
> /etc/hostname, I've done both), and on reboot, it returns to (none).
Anything you set with the hostname command is transient. The /etc/hostname
file is permanent.
If the contents of /etc/hostname are not being used as the hostname
at boot, then there is something wrong with your start-up scripts.
This is where we get to the advice about verifying the integrity of
/etc/init.d/hostname.sh as you had stumbled upon earlier.
On my own wheezy VPS:
greg@remote:~$ ls -ld /etc/init.d/hostname.sh
-rwxr-xr-x 1 root root 1423 Mar 27 2012 /etc/init.d/hostname.sh
greg@remote:~$ ls -ld /etc/rc*/*hostname*
lrwxrwxrwx 1 root root 21 Nov 28 2012 /etc/rcS.d/S06hostname.sh -> ../init.d/hostname.sh
Of course, wheezy may not be using sysvinit (there was an option to
use a "technology preview" of systemd, and I think there's another
option as well whose name I can't remember). If you're not using
sysvinit on wheezy, then things might become extremely interesting
for you, as you try to track down the problem.
Reply to: