mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
systemd: Make "systemctl daemon-reexec" do the right thing on NixOS
This commit is contained in:
parent
0874615fcc
commit
beb5b65e9c
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1p3pf8gvx43g62l9x85l8ym12wc373cmaysi41sahjndp2agicig";
|
||||
};
|
||||
|
||||
patches = [ ./name_to_handle_at.patch ];
|
||||
patches = [ ./name_to_handle_at.patch ./reexec.patch ];
|
||||
|
||||
buildInputs =
|
||||
[ pkgconfig intltool gperf libcap dbus kmod xz pam acl
|
||||
|
|
15
pkgs/os-specific/linux/systemd/reexec.patch
Normal file
15
pkgs/os-specific/linux/systemd/reexec.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
Make "systemctl daemon-reexec" do the right thing on NixOS.
|
||||
|
||||
diff --git a/src/core/main.c b/src/core/main.c
|
||||
index 04fc0b3..0f5b0e9 100644
|
||||
--- a/src/core/main.c
|
||||
+++ b/src/core/main.c
|
||||
@@ -1819,7 +1819,7 @@ finish:
|
||||
char_array_0(sfd);
|
||||
|
||||
i = 0;
|
||||
- args[i++] = SYSTEMD_BINARY_PATH;
|
||||
+ args[i++] = "/run/current-system/systemd/lib/systemd/systemd";
|
||||
if (switch_root_dir)
|
||||
args[i++] = "--switched-root";
|
||||
args[i++] = arg_running_as == SYSTEMD_SYSTEM ? "--system" : "--user";
|
Loading…
Reference in a new issue