-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Networkmanager: rename service to match upstream #51382
Conversation
44b2fc4
to
2d0ad36
Compare
There is one blocker though. When doing the upgrade it did not start NetworkManager again for automatically. Does anybody know why? |
Try --- a/pkgs/tools/networking/modem-manager/default.nix
+++ b/pkgs/tools/networking/modem-manager/default.nix
@@ -27,30 +27,16 @@
"--with-polkit"
"--with-udev-base-dir=$(out)/lib/udev"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
+ "--with-dbus-sys-dir=$(out)/etc/dbus-1/system.d"
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-suspend-resume=systemd"
];
- installFlags = [ "DESTDIR=\${out}" ];
-
- preInstall = ''
- mkdir -p $out/etc/systemd/system
- '';
-
postInstall = ''
- # rename to modem-manager to be in style
- mv $out/$out/etc/systemd/system/ModemManager.service $out/etc/systemd/system/modem-manager.service
- rm -rf $out/$out/etc
- mv $out/$out/* $out
- DIR=$out/$out
- while rmdir $DIR 2>/dev/null; do
- DIR="$(dirname "$DIR")"
- done
-
# systemd in NixOS doesn't use `systemctl enable`, so we need to establish
# aliases ourselves.
- ln -s $out/etc/systemd/system/modem-manager.service \
+ ln -s $out/etc/systemd/system/ModemManager.service \
$out/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service
'';
|
2d0ad36
to
f7a3cb0
Compare
Applied. This probably fixes also some references in modemmanager. |
Would keeping the legacy service name fix the transition issue? Anyway, even if this does not work, I would just merge this. It is not that bad. |
That sounds prudent to me, considering people might have started depending on the naming we are now reverting. |
I would say this is reasonable price to pay. User can always restart the service manually. |
I gave @jtojnar's suggestion a try - adding the following patch: From a201d69a825668570fbe0dc1837c229c6e70319a Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Tue, 19 Mar 2019 01:54:27 +0100
Subject: [PATCH] network-manager: add legacy service name to prevent
NetworkManager from not starting back up
This can be removed once 19.10 is released.
---
pkgs/tools/networking/network-manager/default.nix | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix
index 3df029310fe..9d1ff4bb8c9 100644
--- a/pkgs/tools/networking/network-manager/default.nix
+++ b/pkgs/tools/networking/network-manager/default.nix
@@ -92,6 +92,11 @@ in stdenv.mkDerivation rec {
# 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/NetworkManager.service $out/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service
+
+ # Add the legacy service name from before #51382 to prevent NetworkManager
+ # from not starting back up:
+ # TODO: remove this once 19.10 is released
+ ln -s $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/network-manager.service
'';
passthru = {
--
2.19.2
And I was able to switch to the new configuration with
|
…rvice" This reverts commit c6882b2.
Compatibility with other distributions/software and expectation of users coming from other systems should have higher priority over consistency. In particular this fixes NixOS#51375, where the NetworkManager-wait-online.service broke as a result of this.
rebased on staging, fixed merge commits and applied the patch from #51382 (comment) (with a slight change in the commit message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This prevents NetworkManager from not starting back up while switching configurations. This can be removed once 19.10 is released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, we should get this in.
Think it has been sufficiently tested.
Well, then I'll be the one pushing the button :-) |
Motivation for this change
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.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)