diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-21 14:57:12 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-21 14:57:12 -0400 |
commit | beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc (patch) | |
tree | ff60f6bb320407ca9acfbd4489f0a0fa13d4cae7 /pkgs/os-specific/linux/systemd | |
parent | 0874615fcce838176a1626a35498258baccdfd9d (diff) | |
download | nixlib-beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc.tar nixlib-beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc.tar.gz nixlib-beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc.tar.bz2 nixlib-beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc.tar.lz nixlib-beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc.tar.xz nixlib-beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc.tar.zst nixlib-beb5b65e9cf621ec5c58177d7a4273ef4f6cb5fc.zip |
systemd: Make "systemctl daemon-reexec" do the right thing on NixOS
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/reexec.patch | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 99b50ab1b336..bfc168718575 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -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 diff --git a/pkgs/os-specific/linux/systemd/reexec.patch b/pkgs/os-specific/linux/systemd/reexec.patch new file mode 100644 index 000000000000..ff13a44ca0b2 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/reexec.patch @@ -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"; |