]> git.pld-linux.org Git - packages/SysVinit.git/blame - sysvinit-halt.patch
- updated to 3.04
[packages/SysVinit.git] / sysvinit-halt.patch
CommitLineData
6fc1dd75 1--- sysvinit-2.78/src/halt.c.halt Wed Apr 19 15:48:23 2000
2+++ sysvinit-2.78/src/halt.c Wed Apr 19 15:55:03 2000
3@@ -218,8 +218,19 @@
4 * See if we are in runlevel 0 or 6.
5 */
6 c = get_runlevel();
7- if (c != '0' && c != '6')
8+ if (c != '0' && c != '6') {
9+ char *file;
10+
11+ if (do_poweroff) {
12+ file = strdup("/poweroff");
13+ } else {
14+ file = strdup("/halt");
15+ }
16+ close(open(file, O_CREAT|O_RDWR, 0644));
17+ free(file);
18+
e1cc0c55 19 do_shutdown(do_reboot ? "-r" : "-h", do_poweroff, tm);
6fc1dd75 20+ }
21 }
22
23 /*
This page took 0.059946 seconds and 4 git commands to generate.