1
0
Fork 1
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:
Eelco Dolstra 2012-09-21 14:57:12 -04:00
parent 0874615fcc
commit beb5b65e9c
2 changed files with 16 additions and 1 deletions

View file

@ -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

View 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";