summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-11-23 14:44:48 +0100
committerLars Wendler <polynomial-c@gentoo.org>2018-11-23 14:47:43 +0100
commit437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d (patch)
treefcd6c3943e43a0f4e6ca3b81a140d4332e253dd9 /sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch
parentdev-perl/Unicode-MapUTF8: amd64 stable wrt bug #667266 (diff)
downloadgentoo-437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d.tar.gz
gentoo-437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d.tar.bz2
gentoo-437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d.zip
sys-apps/sysvinit: Bump to version 2.92_beta
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch')
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch
new file mode 100644
index 000000000000..cf8786ac4a23
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch
@@ -0,0 +1,71 @@
+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
+
+---
+ man/shutdown.8 | 8 +++-----
+ src/shutdown.c | 10 ++++------
+ 2 files changed, 7 insertions(+), 11 deletions(-)
+
+--- sysvinit-2.92/man/shutdown.8
++++ sysvinit-2.92/man/shutdown.8
+@@ -66,17 +66,15 @@
+ .\"}}}
+ .\"{{{ -h
+ .IP \fB\-h\fP
+-Halt or power off after shutdown.
++Equivalent to -P, unless -H is specified.
+ .\"}}}
+ .\"{{{ -P
+ .IP \fB\-P\fP
+-Modifier to the -h flag. Halt action is to turn off the power.
+-Must be used with the -h flag.
++Action is to turn off the power.
+ .\"}}}
+ .\"{{{ -H
+ .IP \fB\-H\fP
+-Modifier to the -h flag. Halt action is to halt or drop into boot
+-monitor on systems that support it. Must be used with the -h flag.
++Action is to halt or drop into boot monitor on systems that support it.
+ .\"}}}
+ .\"{{{ -f
+ .IP \fB\-f\fP
+--- sysvinit-2.92/src/shutdown.c
++++ sysvinit-2.92/src/shutdown.c
+@@ -546,9 +546,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;
+@@ -564,6 +566,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;
+@@ -603,12 +607,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) {
+