https://bugzilla.novell.com/show_bug.cgi?id=803653 https://bugzilla.novell.com/show_bug.cgi?id=803653#c1 --- Comment #1 from Frederic Crozat <fcrozat@suse.com> 2013-02-15 15:26:38 UTC --- (In reply to comment #0)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0
hostnamed/hostnamectl is just broken.
By default...
michael@linux-h2qj:~> hostnamectl Static hostname: n/a Transient hostname: linux-h2qj.site Pretty hostname: n/a <snip>
That's not my transient hostname, which is completely different. That's my static hostname. It's supposed to be stored in /etc/hostname according to the manpage and upstream, but it's actually in /etc/HOSTNAME as that's where it's always been for openSUSE.
michael@linux-h2qj:~> hostnamectl set-hostname 'Victory Road'
michael@linux-h2qj:~> hostnamectl Static hostname: victory-road Pretty hostname: Victory Road <snip>
Now that made /etc/hostname:
michael@linux-h2qj:~> cat /etc/hostname victory-road michael@linux-h2qj:~> cat /etc/machine-info PRETTY_HOSTNAME=Victory Road michael@linux-h2qj:~> cat /etc/HOSTNAME linux-h2qj.site
YaST of course only knows about /etc/HOSTNAME. So I think hostnamed is not really accomplishing anything? Maybe it should be patched to use /etc/HOSTNAME instead for now?
I'll modify hostnamed to read /etc/HOSTNAME if /etc/hostname doesn't exist. When assigning a new hostname, /etc/hostname will be filled and /etc/HOSTNAME will be replaced by a symlink to /etc/hostname. I've checked modifying hostname with YaST will correctly modify /etc/hostname, by following created symlink.
Also we're missing a soft dependency on nss-myhostname, so if hostnamed DID work it would make the new hostname unresolvable. That's merged into systemd 197 upstream, but since we're on systemd 195 we just get a little complaint in the journal that we're doing it wrong:
Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolvable. Please install nss-myhostname!
This part is handled in bnc#783841 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.