aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch')
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
new file mode 100644
index 00000000..b8e403f6
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
@@ -0,0 +1,36 @@
+This patch makes shutdown use the Single User runlevel by default so
+the gettys are shutdown too.
+
+Roy Marples <uberlord@gentoo.org>
+
+--- a/man/shutdown.8
++++ b/man/shutdown.8
+@@ -44,7 +44,7 @@ mail and news processing programs a chance to exit cleanly, etc.
+ \fBshutdown\fP does its job by signalling the \fBinit\fP process,
+ asking it to change the runlevel.
+ Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used
+-to reboot the system, and runlevel \fB1\fP is used to put to system into
++to reboot the system, and runlevel \fBS\fP is used to put to system into
+ a state where administrative tasks can be performed; this is the default
+ if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP.
+ To see which actions are taken on halt or reboot see the appropriate
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -506,7 +506,7 @@ int main(int argc, char **argv)
+ usage();
+ exit(1);
+ }
+- strcpy(down_level, "1");
++ strcpy(down_level, "S");
+ halttype = NULL;
+
+ /* Process the options. */
+@@ -685,6 +685,8 @@ int main(int argc, char **argv)
+ strcpy(newstate, "for reboot");
+ break;
+ case '1':
++ case 'S':
++ case 's':
+ strcpy(newstate, "to maintenance mode");
+ break;
+ default: