diff options
author | Roy Marples <roy@marples.name> | 2008-05-10 10:04:34 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-05-10 10:04:34 +0000 |
commit | 3663cf1e2a9b8ac73e76f1ac18dffc8274b1fe65 (patch) | |
tree | e27ea57786b2463083ca135c202c95014fb4f72f /src/rc/rc.c | |
parent | 766ec96e3d6e1b8d7a73bbc46817b763d77d9b2a (diff) |
Only launch single user when RUNLEVEL == S, #74.
Diffstat (limited to 'src/rc/rc.c')
-rw-r--r-- | src/rc/rc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c index d5e9f34c..af1eb37b 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -338,12 +338,13 @@ static void sulogin(bool cont) if (! cont) { rc_logger_close(); #ifdef __linux__ - execl("/sbin/sulogin", "/sbin/sulogin", (char *) NULL); - eerrorx("%s: unable to exec `/sbin/sulogin': %s", - applet, strerror(errno)); -#else - exit(EXIT_SUCCESS); + if (RUNLEVEL && strcmp(RUNLEVEL, "S") == 0) { + execl("/sbin/sulogin", "/sbin/sulogin", (char *) NULL); + eerrorx("%s: unable to exec `/sbin/sulogin': %s", + applet, strerror(errno)); + } #endif + exit(EXIT_SUCCESS); } #ifdef __linux__ |