mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
Making halt and shutdown work fine in sysvinit (they had hardcoded /sbin, and
now I hardcode $out/sbin) I also remove a patch I don't know what was it for. svn path=/nixpkgs/branches/stdenv-updates/; revision=24874
This commit is contained in:
parent
cbb3b6f1dc
commit
7ff9a49929
@ -10,7 +10,10 @@ stdenv.mkDerivation {
|
||||
sha256 = "068mvzaz808a673zigyaqb63xc8bndh2klk16zi5c83rw70wifv0";
|
||||
};
|
||||
|
||||
patches = [ ./sysvinit-2.85-exec.patch ];
|
||||
prePatch = ''
|
||||
# Patch some minimal hard references, so halt/shutdown work
|
||||
sed -i -e 's,/sbin/,$out/sbin/,' src/halt.c src/init.c src/paths.h
|
||||
'';
|
||||
|
||||
makeFlags = "SULOGINLIBS=-lcrypt ROOT=$(out) MANDIR=/share/man";
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
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);
|
Loading…
Reference in New Issue
Block a user