Description of problem: The hostname of the machine is not the good one. If the HOSTNAME entry in /etc/sysconfig/network is not filled, it should be "localhost" and if it is filled, it should be the filled one. But now, it is $HOSTNAME. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Start the machine 2. Launch a terminal or go to tty 3. The hostname displayed in term is $HOSTNAME
Source RPM: (none) => net-tools
Works ok here. $ grep -i hostname /etc/sysconfig/network HOSTNAME=hodgins.homeip.net $ echo $HOSTNAME hodgins.homeip.net It's set in /etc/rc.d/rc.sysinit, which means you have to reboot after changing the hostname. Line 8 sets it to the value returned by the hostname command. Line 15 source /etc/sysconfig/network, so if it is defined in that file, that will overwrite the line 8 setting. Line 23 will set it to localhost if it is not already set. Line 304 uses the hostname command to set the kernels version of the hostname to match the value from the above settings.
CC: (none) => davidwhodgins
is this bug with systemd ?
CC: (none) => dmorganec
Ah. Good point. I didn't notice that the bug report was for cauldron.
Are every chauldron distro with systemd ? How be sure that I'm running systemd (because I feel like still running initscripts)
Hardware: i586 => x86_64
now cauldron should use systemd by default. Try to add your hostname in /etc/hostname, reboot and see if it is applied.
Nothing happen Note that the hostname is set first, but is then set to $HOSTNAME. (I can see during the booting process that it is set (KDM display "localhost") but then, it sets $HOSTNAME)
what happens with a "new user" ?
A fresh install ? Because it is system-wide. Even not login, this happen : The KDM starts quickly, and display "localhost" as machine name. But restarting X (KDM) after TTY is available (booting finished), it wil display $HOSTNAME.
Blocks: (none) => 2120
Similar problem here: At install, I specify as host pcjuergen.unige.ch. After booting the system, the shell prompt says "localhost", and typing the command "hostname" also provides localhost. Nevertheless, my /etc/sysconfig/network contains the correct line "HOSTNAME=pcjuergen.unige.ch" This is independant from kdm: same problem if I type "hostname" in a console, immediately after booting (running a 32-bit system on a Dell Optiplex 755 system). If, after booting, I explicitely define the hostname by typing "hostname pcjuergen.unige.ch" the hostname remains correctly set, and the shell prompts show pcjuergen.unige.ch as they should. But after rebooting, I am back at localhost. So, it looks as if the mechanism for defining the hostname work correctly, but during boot the hostname is not correctly replicated from the value defined in /etc/sysconfig/network
CC: (none) => juergen.harms
I'm with a fresh install of 2 alpha 1. Using systemd on a single / /usr partition (no separated /usr). And using a self defined hostname in /etc/sysconfig/network. The problem do not exist anymore.
The problem persists for me: fresh install yesterday (26.11) at about 18h00 (all directories in a single root partition). All updates available up to 7h30 this morning installed. Still faulty behaviour precisely as described in comment 9 - in spite of now having done a fresh install.
I confirm the comment 9. systemd and recent initscripts (rc.sysinit) use /etc/hostname, but the installer or drakconnect write the hostname only in /etc/sysconfig/network, and don't write/update /etc/hostname. In network.pm, write_hostname should keep in sync hostname in /etc/sysconfig/network and /etc/hostname. Please, could you review the proposed patch in attachment. regards, Luc
CC: (none) => lmenut, mageiaHardware: x86_64 => AllSource RPM: net-tools => libdrakx-net
Created attachment 1143 [details] update hostname in /etc/hostname
Luc, thanks for the patch. blino, I'm assigning this one to you as libdrakx-net maintainer.
Assignee: bugsquad => mageia
Keywords: (none) => PATCH
seems correct. Blino, can we have your review please ? (In reply to comment #12) > I confirm the comment 9. > systemd and recent initscripts (rc.sysinit) use /etc/hostname, but the > installer or drakconnect write the hostname only in /etc/sysconfig/network, and > don't write/update /etc/hostname. This is not completly true, systemd %post handle this. Maybe there is a bug somewhere. So on a fresh install hostname is set to localhost and in a update this is set to what we had in /etc/sysconfig/network, but where you are right this is if the hostname is graphically modified during install or in drakconnect. ( i just wanted to add more informations ). PS: ok bug found in the systemd packaging side should be OK on next systemd rpm. but the patch still stay valid.
CC: (none) => thierry.vignaudSummary: Hostname is $HOSTNAME => drakx-net should write (& read) /etc/hostname too for systemd
*** Bug 3665 has been marked as a duplicate of this bug. ***
CC: (none) => junk_no_spam
I'll take this one from Blino (tho' his input is, as always, most welcome too).
Status: NEW => ASSIGNEDCC: (none) => mageiaAssignee: mageia => mageia
OK, should be fixed in drakx-net-1.3 Please feel free to review the slightly expanded version of Luc's patch. http://svnweb.mageia.org/soft?view=revision&revision=2566 I also wrote "localhost" to the file if no real hostname was available (which is what the %post script in the systemd rpm does.
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED