[Pkg-sysvinit-devel] Bug#643771: initscripts: hostname is set to FQDN; /etc/hostname not read or hostname.sh not executed?

Wouter Van Hemel wouter-debian at publica.duodecim.org
Fri Sep 30 12:57:48 UTC 2011


On Thu, 29 Sep 2011 16:51:57 +0200, Petter Reinholdtsen <pere at hungry.com>

wrote:

> [Wouter Van Hemel]

>> Hello,

> 

> Hi.

> 

>> Since yesterday, `hostname` returns the FQDN and also $HOSTNAME is set

>> to the FQDN.

> 

> Did you just upgrade the initscripts package?  I would suspect changed

> behaviour in /bin/hostname, or something setting the hostname before

> /etc/init.d/hostname get a chance to execute.  Which boot system are you

> using?

> 



I'm using the default boot system in Debian unstable, which should be the

dependency-based boot sequence.



I haven't changed anything at all on this machine for a long time – except

for daily upgrades from Debian unstable. I don't remember if there have

been any updates to the hostname or initscripts packages these last few

days; at least the directory times for

/usr/share/doc/{hostname,initscripts} are several months old.



However, the dhcp client seems to have been updated a few days ago:



/usr/share/doc/isc-dhcp-client/changelog.Debian.gz:



  * debian/dhclient-script.{linux,kfreebsd}: applied patch from Peter

Marschall

    to factor out the hostname setting to a separate function

  * debian/dhclient-script.{linux,kfreebsd}: applied patch from Peter

Marschall

    to harmonize the logic for setting the hostname (closes: #246155)





This makes a lot of sense, because my "hostname" configuration changed

quite randomly in the middle of the day... It could have been triggered by

a new dhcp lease.



The set_hostname() function in /sbin/dhclient-script seems to be

re-setting the hostname from the dhcp value, which is a FQDN...



I should reassign this. ;)





Thanks for your time!



  Wouter







More information about the Pkg-sysvinit-devel mailing list