diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
commit | d99093fb4bb5652015c06274d64083daa2439e4f (patch) | |
tree | cf61513204d97974179580065e85df5c8009087c /sys-apps/sysvinit/files/sysvinit-2.99-shutdown-h.patch | |
parent | 463397cf1e064185110fe57c568d73f99a06f5d1 (diff) |
gentoo resync : 03.03.2021
Diffstat (limited to 'sys-apps/sysvinit/files/sysvinit-2.99-shutdown-h.patch')
-rw-r--r-- | sys-apps/sysvinit/files/sysvinit-2.99-shutdown-h.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/sys-apps/sysvinit/files/sysvinit-2.99-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.99-shutdown-h.patch new file mode 100644 index 000000000000..a4ceeda69c5f --- /dev/null +++ b/sys-apps/sysvinit/files/sysvinit-2.99-shutdown-h.patch @@ -0,0 +1,82 @@ +other inits have moved to not requiring the -h flag when used with -H/-P. +modify sysvinit to be the same since it really doesn't matter. + +https://bugs.gentoo.org/449354 + +patch by Doug Goldstein + +--- sysvinit-2.99/man/shutdown.8 ++++ sysvinit-2.99/man/shutdown.8 +@@ -66,22 +66,19 @@ + .\"}}} + .\"{{{ -h + .IP \fB\-h\fP +-Halt or power off after shutdown. Usually used with the \fI-P\fP or \fI-H\fP flags, +-depending on whether we want to poweroff or simply stop the operating system. ++Equivalent to \fI-P\fP, unless \fI-H\fP is specified. + .\"}}} + .\"{{{ -P + .IP \fB\-P\fP +-Modifier to the \fI-h\fP flag. Halt action is to turn off the power. +-Must be used with the \fI-h\fP flag. ++Halt action is to turn off the power. + .\"}}} + .\"{{{ -H + .IP \fB\-H\fP +-Modifier to the \fI-h\fP flag. Halt action is to halt or drop into boot +-monitor on systems that support it. Must be used with the \fI-h\fP flag. ++Action is to halt or drop into boot monitor on systems that support it. + Halting is often used to run through the shutdown process and leave + output on the screen for debugging purposes. Or when the user wants the OS to + stop, but leave the power on. To power off at the end of the shutdown sequence +-use the \fI-P\fP modifier instead. ++use the \fI-P\fP option instead. + .\"}}} + .\"{{{ -f + .IP \fB\-f\fP +--- sysvinit-2.99/src/shutdown.c ++++ sysvinit-2.99/src/shutdown.c +@@ -144,9 +144,7 @@ + "\t\t -r: reboot after shutdown.\n" + "\t\t -h: halt after shutdown.\n" + "\t\t -P: halt action is to turn off power.\n" +- "\t\t can only be used along with -h flag.\n" + "\t\t -H: halt action is to just halt.\n" +- "\t\t can only be used along with -h flag.\n" + "\t\t -f: do a 'fast' reboot (skip fsck).\n" + "\t\t -F: Force fsck on reboot.\n" + "\t\t -n: do not go through \"init\" but go down real fast.\n" +@@ -556,9 +554,11 @@ + switch(c) { + case 'H': + halttype = "HALT"; ++ down_level[0] = '0'; + break; + case 'P': + halttype = "POWEROFF"; ++ down_level[0] = '0'; + break; + case 'a': /* Access control. */ + useacl = 1; +@@ -574,6 +574,8 @@ + break; + case 'h': /* Halt after shutdown */ + down_level[0] = '0'; ++ if (!halttype) ++ halttype = "POWEROFF"; + break; + case 'f': /* Don't perform fsck after next boot */ + fastboot = 1; +@@ -613,12 +615,6 @@ + } + } + +- if (NULL != halttype && down_level[0] != '0') { +- fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n"); +- usage(); +- exit(1); +- } +- + /* Do we need to use the shutdown.allow file ? */ + if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) { + |