blob: 68970c655f150b8b1a3afb0d67890adabe90a162 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
Search $PATH for the shutdown binary instead of hard-coding /sbin/shutdown,
which isn't valid on NixOS (and a compatibility link on most other modern
distros anyway).
-- nckx <tobias.geerinckx.rice@gmail.com>
diff -ru util-linux-2.27-orig/include/pathnames.h util-linux-2.27/include/pathnames.h
--- util-linux-2.27-orig/include/pathnames.h 2015-06-29 13:13:14.669847478 +0200
+++ util-linux-2.27/include/pathnames.h 2015-10-07 20:09:17.401022602 +0200
@@ -54,7 +54,7 @@
#define _PATH_INITTAB "/etc/inittab"
#define _PATH_RC "/etc/rc"
#define _PATH_REBOOT "/sbin/reboot"
-#define _PATH_SHUTDOWN "/sbin/shutdown"
+#define _PATH_SHUTDOWN "shutdown"
#define _PATH_SINGLE "/etc/singleboot"
#define _PATH_SHUTDOWN_CONF "/etc/shutdown.conf"
diff -ru util-linux-2.27-orig/sys-utils/rtcwake.c util-linux-2.27/sys-utils/rtcwake.c
--- util-linux-2.27-orig/sys-utils/rtcwake.c 2015-08-05 11:32:44.453821232 +0200
+++ util-linux-2.27/sys-utils/rtcwake.c 2015-10-07 20:09:37.834032536 +0200
@@ -576,7 +576,7 @@
arg[i++] = "now";
arg[i] = NULL;
if (!ctl.dryrun) {
- execv(arg[0], arg);
+ execvp(arg[0], arg);
warn(_("failed to execute %s"), _PATH_SHUTDOWN);
rc = EXIT_FAILURE;
}
|