diff options
Diffstat (limited to 'src/rc/rc.c')
-rw-r--r-- | src/rc/rc.c | 8 |
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 */ |