summary refs log tree commit diff
path: root/pkgs/os-specific/linux/sysvinit/sysvinit-2.85-exec.patch
blob: ef3d0f66b2f0888626fbd1e01322c2cf3c549be5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -ruN sysvinit-2.85/src/halt.c sysvinit-2.85.new/src/halt.c
--- sysvinit-2.85/src/halt.c	2001-11-27 13:12:03.000000000 +0100
+++ sysvinit-2.85.new/src/halt.c	2005-10-18 20:09:47.000000000 +0200
@@ -53,6 +53,10 @@
 #define KERNEL_MONITOR	1 /* If halt() puts you into the kernel monitor. */
 #define RUNLVL_PICKY	0 /* Be picky about the runlevel */
 
+#ifndef EXEC_PATH
+  #define EXEC_PATH "/sbin/shutdown"
+#endif
+
 extern int ifdown(void);
 extern int hddown(void);
 extern void write_wtmp(char *user, char *id, int pid, int type, char *line);
@@ -139,7 +143,7 @@
 	args[i++] = "now";
 	args[i++] = NULL;
 
-	execv("/sbin/shutdown", args);
+	execv(EXEC_PATH, args);
 	execv("/etc/shutdown", args);
 	execv("/bin/shutdown", args);