diff options
author | Roy Marples <roy@marples.name> | 2008-04-08 15:59:56 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-04-08 15:59:56 +0000 |
commit | e82435c2f42955d9e78bbf307b2700636d6abcd7 (patch) | |
tree | bd9a54359bd038455c591bcfd20d6d4fa2d012d5 | |
parent | 71dd28065663fcd56a8160ecb1be262235a648b8 (diff) |
rc_runlevel is now the preferred kernel commandline option for choosing default runlevel.
-rw-r--r-- | src/rc/rc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c index 5ae7e1f1..dee07324 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -691,12 +691,15 @@ static void do_newlevel(const char *newlevel) run_script(INITSH); #ifdef __linux__ - /* If we requested a softlevel, save it now */ - set_krunlevel(NULL); - if ((cmd = proc_getent("softlevel"))) { + /* If we requested a runlevel, save it now */ + if ((cmd = proc_getent("rc_runlevel"))) { set_krunlevel(cmd); free(cmd); - } + } else if ((cmd = proc_getent("softlevel"))) { + set_krunlevel(cmd); + free(cmd); + } else + set_krunlevel(NULL); #endif /* Setup our coldplugged services now */ @@ -1049,7 +1052,7 @@ int main(int argc, char **argv) snprintf(pidstr, sizeof(pidstr), "%d", getpid()); setenv("RC_PID", pidstr, 1); - /* Load current softlevel */ + /* Load current runlevel */ bootlevel = getenv("RC_BOOTLEVEL"); runlevel = rc_runlevel_get(); @@ -1199,7 +1202,7 @@ int main(int argc, char **argv) } } - /* Save our softlevel now */ + /* Save our runlevel now */ if (going_down) rc_runlevel_set(newlevel); |