I finally found why what hostnamectl calls "transient" hostname was still localhost: looks like something is reading the old value from /etc/conf.d/hostname (the openrc config one), but I don't know what is doing this yet :|
If you are using NetworkManager, it is probably being read by the ifnet plugin.
That would explain this. It's done in: rc/settings/plugins/ifnet/plugin.c :/
*** Bug 485754 has been marked as a duplicate of this bug. ***
One possible solution: Change the default config to enable or disable the ifnet plugin based on the systemd use flag.
Will try to handle it before getting gnome stabilized :/ Probably it's the right thing to do as ifnet plugins looks to be related with openrc stuff only
Is there a way to sync keys between ifnet and keyfile plugins to prevent people from needing to put their password again?
I think a better approach would be to simply prefer the systemd hostname over /etc/conf.d/hostname.
But last time I saw the ifnet plugin, it will also play with the conf.d/net stuff, and maybe that is more prone to errors :/ As a side note, maybe it's "better" to try to use keyfile plugin when possible (as it's the case when running systemd) because it's more tested by upstream and, once user is not running openrc, I don't see any reason to keep using ifnet plugin
+*networkmanager-0.9.8.6 (05 Oct 2013) + + 05 Oct 2013; Pacho Ramos <pacho@gentoo.org> +networkmanager-0.9.8.6.ebuild, + -networkmanager-0.9.6.4-r1.ebuild, -networkmanager-0.9.8.2-r3.ebuild: + Version bump, use keyfile plugin instead of ifnet for systemd to prevent + collisions and problems like bug #485658 +
Can you please inform the users more verbosely of the consequences of the removal of the ifnet plugin? I had to delete /etc/NetworkManager/NetworkManager.conf to be able to start KDE. Otherwise NetworkManager would not start, because it tried to load the ifnet pluginm which is mentioned in the config. The stopped service or missing network connectivity then seems to have torn the rest of the system with it.
I put a warning about the need of filling passwords again, about the other problem with that directory, I didn't suffer it :| That is probably because I never edited the file myself and, then, portage removed it cleanly + 06 Oct 2013; Pacho Ramos <pacho@gentoo.org> networkmanager-0.9.8.6.ebuild: + Add a warning for people having a NetworkManager.conf that loads ifnet plugin + preserved for some reason (#485658#c10 by Dennis Schridde) +
(In reply to Pacho Ramos from comment #11) Thanks!
so now that networkmanager doesn't use ifnet anymore when USE=systemd, how do I setup static network with NM and systemd? What's the official way to do that?
You can use nm-connection-editor and gnome-control-center for configuring network with static IP
My use case is this: i have a bunch of headless home servers that have static IP for historic reasons. Until NM 0.9.6.4 I could just use /etc/conf.d/net, even when running systemd. There is not X, so nm-connection-editor is not really a nice solution. Now you are deliberately disabling this without, correct me if I'm wrong, too much advertisement (user that upgrades and reboots may not realize that they lose the whole network configuration!). So, something that was previously possible (using conf.d/net) is no longer possible and there does not seem to be a documented migration path :/.
I added warnings long time ago and also a note to the upgrade guide (this was done with the jump from Gnome 2.32 to 3.8): if use systemd; then if [[ ${REPLACING_VERSIONS} < 0.9.8.6 ]]; then ewarn "Ifnet plugin won't be used with systemd support enabled" ewarn "as it is meant to be used with openRC and can cause collisions" ewarn "(like bug #485658)." ewarn "Because of this, you will likely need to reconfigure some of" ewarn "your networks." fi if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then if grep -q plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf" ewarn "Since it won't be used when running under Systemd, you will need to stop setting" ewarn "ifnet plugin there to allow NetworkManager to work." fi fi fi Regarding how to configure it manually, I am not sure as I have always used gui tools to that. At http://en.opensuse.org/SDB:Knetworkmanager_static_ip_auto_eth0#Method_1_-_System_Connection_.28Auto_eth0.29 you have some examples of the kind of files that are created by the tool