summaryrefslogtreecommitdiff
path: root/src/rc/rc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-13 11:02:00 +0000
committerRoy Marples <roy@marples.name>2009-01-13 11:02:00 +0000
commitabcc4c5c72147a16b8710392112e4a07c3ed4b55 (patch)
treea51853543ec80a94727a2535b95f0fb013003e09 /src/rc/rc.c
parentfcf1cce549542bc6948c8b808becbd5933f15bf4 (diff)
downloadopenrc-abcc4c5c72147a16b8710392112e4a07c3ed4b55.tar.gz
openrc-abcc4c5c72147a16b8710392112e4a07c3ed4b55.tar.bz2
openrc-abcc4c5c72147a16b8710392112e4a07c3ed4b55.tar.xz
Don't allow SYSVINIT parameters through anymore.
RC_REBOOT is now yes when rebooting. Document the special reboot runlevel.
Diffstat (limited to 'src/rc/rc.c')
-rw-r--r--src/rc/rc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c
index b545960..a7a7b8d 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -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 */