Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 342716 Details for
Bug 449354
sys-apps/sysvinit: shutdown requires -h + -P/-H which differs from other init systems
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch to sysvinit to remove -h + -P/-H requirement
shutdown-P-H-flags.patch (text/plain), 1.72 KB, created by
Doug Goldstein (RETIRED)
on 2013-03-20 15:07:29 UTC
(
hide
)
Description:
Patch to sysvinit to remove -h + -P/-H requirement
Filename:
MIME Type:
Creator:
Doug Goldstein (RETIRED)
Created:
2013-03-20 15:07:29 UTC
Size:
1.72 KB
patch
obsolete
>diff -Nur sysvinit-2.88dsf/man/shutdown.8 sysvinit-2.88dsf-shutdown/man/shutdown.8 >--- sysvinit-2.88dsf/man/shutdown.8 2010-03-23 09:37:01.000000000 -0500 >+++ sysvinit-2.88dsf-shutdown/man/shutdown.8 2013-03-20 10:01:08.000000000 -0500 >@@ -66,16 +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 >-Halt action is to turn off the power. >+Action is to power-off the machine. > .\"}}} > .\"{{{ -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 the machine. > .\"}}} > .\"{{{ -f > .IP \fB\-f\fP >diff -Nur sysvinit-2.88dsf/src/shutdown.c sysvinit-2.88dsf-shutdown/src/shutdown.c >--- sysvinit-2.88dsf/src/shutdown.c 2010-03-23 09:37:01.000000000 -0500 >+++ sysvinit-2.88dsf-shutdown/src/shutdown.c 2013-03-20 09:58:59.000000000 -0500 >@@ -514,9 +514,11 @@ > switch(c) { > case 'H': > halttype = "HALT"; >+ down_level[0] = '0'; > break; > case 'P': > halttype = "POWERDOWN"; >+ down_level[0] = '0'; > break; > case 'a': /* Access control. */ > useacl = 1; >@@ -532,6 +534,8 @@ > break; > case 'h': /* Halt after shutdown */ > down_level[0] = '0'; >+ if (!halttype) >+ halttype = "POWERDOWN"; > break; > case 'f': /* Don't perform fsck after next boot */ > fastboot = 1; >@@ -565,12 +569,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) { >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 449354
: 342716