[systemd-devel] Transient hostname default behaviour
zbyszek at in.waw.pl
Mon Oct 29 14:43:32 PDT 2012
On Mon, Oct 29, 2012 at 10:08:48PM +0100, Kay Sievers wrote:
> On Mon, Oct 29, 2012 at 9:56 PM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
> > On Mon, Oct 29, 2012 at 01:38:55PM -0600, Daniel Drake wrote:
> >> On Mon, Oct 29, 2012 at 1:33 PM, Daniel Drake <dsd at laptop.org> wrote:
> >> > I'm working on updating OLPC configuration for systemd-195 based on this info:
> >> > http://lists.fedoraproject.org/pipermail/test/2012-October/111230.html
> >> >
> >> > I can't quite figure out the hostname thing.
> >> One more thing to add:
> >> It looks like /etc/sysconfig/network is still being parsed even though
> >> the above link suggests otherwise. Putting HOSTNAME=myhostname in
> >> /etc/sysconfig/network sets the default transient hostname. Hmm.
> > Hi,
> > I am seeing similar behaviour, avahi registers on linux.local.
> > In the journal, messages are labelled with the hostname... This makes
> > is fairly easy to spot when the name changes:
> > Oct 28 13:13:34 localhost avahi-daemon: Server startup complete. Host name is linux.local. Local service cookie is 781387960.
> > Oct 28 13:13:36 localhost avahi-daemon: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.122.254.
> > Oct 28 13:13:36 localhost avahi-daemon: New relevant interface eth0.IPv4 for mDNS.
> > Oct 28 13:13:36 localhost avahi-daemon: Registering new address record for 192.168.122.254 on eth0.IPv4.
> > Oct 28 13:13:36 localhost NET: /usr/sbin/dhclient-script : updated /etc/resolv.conf
> > Oct 28 13:13:36 fedora-15 network: Determining IP information for eth0...Failed to issue method call: Unit chronyd.service is not loaded.
> > Oct 28 13:13:36 fedora-15 dhclient: bound to 192.168.122.254 -- renewal in 1611 seconds.
> > So it seems that here the hostname is set by the network configuration
> > script.
> > It _was_ working until a few days ago.
> We've seen in the past NetworkManager setting the hostname from the
> old config file, which it shouldn't.
I don't have NetworkManager rpm installed, so this is unlikely.
> There was also the suspicion that something is calling out to
> hostnamed, which it shouldn't.
I think that it is /usr/sbin/dhclient-script which reads
/etc/sysconfig/network and sets $HOSTNAME and then calls
/etc/sysconfig/network-scripts/ifup-posts which sets the hostname.
(dhclient-script is from dhclient-42.4-15.P2.f19)
(ifup-posts is from initscripts-9.40-1.fc18)
More information about the systemd-devel