Don't allow SYSVINIT parameters through anymore.
RC_REBOOT is now yes when rebooting. Document the special reboot runlevel.
This commit is contained in:
parent
fcf1cce549
commit
abcc4c5c72
10
man/rc.8
10
man/rc.8
@ -1,4 +1,4 @@
|
||||
.\" Copyright 2007-2008 Roy Marples
|
||||
.\" Copyright 2007-2009 Roy Marples
|
||||
.\" All rights reserved
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
@ -22,7 +22,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd November 03, 2008
|
||||
.Dd January 13, 2009
|
||||
.Dt RC 8 SMM
|
||||
.Os OpenRC
|
||||
.Sh NAME
|
||||
@ -65,8 +65,10 @@ All services in the boot and sysinit runlevels are automatically included
|
||||
in all other runlevels except for those listed here.
|
||||
.It Ar single
|
||||
Stops all services except for those in the sysinit runlevel.
|
||||
.It Ar reboot
|
||||
Changes to the shutdown runlevel and then reboots the host.
|
||||
.It Ar shutdown
|
||||
Changes to the single runlevel and then halts the host.
|
||||
Changes to the shutdown runlevel and then halts the host.
|
||||
.El
|
||||
.Pp
|
||||
You should not call any of these runlevels yourself.
|
||||
@ -81,4 +83,4 @@ and let them call these special runlevels.
|
||||
.Xr init 8 ,
|
||||
.Xr shutdown 8
|
||||
.Sh AUTHORS
|
||||
.An Roy Marples <roy@marples.name>
|
||||
.An Roy Marples Aq roy@marples.name
|
||||
|
@ -112,11 +112,10 @@ rc_conf_yesno(const char *setting)
|
||||
}
|
||||
|
||||
static const char *const env_whitelist[] = {
|
||||
"PATH", "SHELL", "USER", "HOME", "TERM",
|
||||
"CONSOLE", "PATH", "SHELL", "USER", "HOME", "TERM",
|
||||
"LANG", "LC_CTYPE", "LC_NUMERIC", "LC_TIME", "LC_COLLATE",
|
||||
"LC_MONETARY", "LC_MESSAGES", "LC_PAPER", "LC_NAME", "LC_ADDRESS",
|
||||
"LC_TELEPHONE", "LC_MEASUREMENT", "LC_IDENTIFICATION", "LC_ALL",
|
||||
"INIT_HALT", "INIT_VERSION", "RUNLEVEL", "PREVLEVEL", "CONSOLE",
|
||||
"IN_HOTPLUG", "IN_BACKGROUND", "RC_INTERFACE_KEEP_CONFIG",
|
||||
NULL
|
||||
};
|
||||
|
@ -842,10 +842,14 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
newlevel = argv[optind++];
|
||||
/* For compat with old system */
|
||||
/* To make life easier, we only have the shutdown runlevel as
|
||||
* nothing really needs to know that we're rebooting.
|
||||
* But for those that do, you can test against RC_REBOOT. */
|
||||
if (newlevel) {
|
||||
if (strcmp(newlevel, "reboot") == 0)
|
||||
if (strcmp(newlevel, "reboot") == 0) {
|
||||
newlevel = UNCONST(RC_LEVEL_SHUTDOWN);
|
||||
setenv("RC_REBOOT", "yes", 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable logging */
|
||||
|
Loading…
Reference in New Issue
Block a user