network-manager: rename systemd service back to match upstream

Compatibility with other distributions/software and expectation
of users coming from other systems should have higher priority over consistency.
In particular this fixes #51375, where the NetworkManager-wait-online.service
broke as a result of this.
This commit is contained in:
Jörg Thalheim 2018-12-02 12:11:44 +00:00 committed by Florian Klink
parent 3f9ac24d53
commit b488c60cdb
4 changed files with 13 additions and 9 deletions

View file

@ -54,7 +54,7 @@
<para>
To manually configure the network on the graphical installer, first disable
network-manager with <command>systemctl stop network-manager</command>.
network-manager with <command>systemctl stop NetworkManager</command>.
</para>
<para>

View file

@ -216,6 +216,13 @@
<literal>[]</literal>.
</para>
</listitem>
<listitem>
<para>
The NetworkManager systemd unit was renamed back from network-manager.service to
NetworkManager.service for better compatibility with other applications expecting this name.
The same applies to ModemManager where modem-manager.service is now called ModemManager.service again.
</para>
</listitem>
<listitem>
<para>
Package <varname>rabbitmq_server</varname> is renamed to

View file

@ -466,7 +466,7 @@ in {
systemd.packages = cfg.packages;
systemd.services."network-manager" = {
systemd.services."NetworkManager" = {
wantedBy = [ "network.target" ];
restartTriggers = [ configFile ];
@ -478,9 +478,9 @@ in {
};
systemd.services.nm-setup-hostsdirs = mkIf dynamicHostsEnabled {
wantedBy = [ "network-manager.service" ];
before = [ "network-manager.service" ];
partOf = [ "network-manager.service" ];
wantedBy = [ "NetworkManager.service" ];
before = [ "NetworkManager.service" ];
partOf = [ "NetworkManager.service" ];
script = concatStrings (mapAttrsToList (n: d: ''
mkdir -p "/run/NetworkManager/hostsdirs/${n}"
chown "${d.user}:${d.group}" "/run/NetworkManager/hostsdirs/${n}"

View file

@ -88,13 +88,10 @@ in stdenv.mkDerivation rec {
# FIXME: Workaround until NixOS' dbus+systemd supports at_console policy
substituteInPlace $out/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf --replace 'at_console="true"' 'group="networkmanager"'
# rename to network-manager to be in style
mv $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/network-manager.service
# systemd in NixOS doesn't use `systemctl enable`, so we need to establish
# aliases ourselves.
ln -s $out/etc/systemd/system/NetworkManager-dispatcher.service $out/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
ln -s $out/etc/systemd/system/network-manager.service $out/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service
ln -s $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service
'';
passthru = {