diff options
author | Roy Marples <roy@marples.name> | 2008-03-01 10:38:47 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-03-01 10:38:47 +0000 |
commit | 2f3ffd053f9a8f2cce20aceae70e27b2df142c74 (patch) | |
tree | 0d1410f167133e48a5a2f954b727354f753d3c76 | |
parent | baf217acc7bd7a8f3212270fb8a3169946a62914 (diff) |
We should use shutdown to goto single user mode.
-rw-r--r-- | src/rc/rc.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c index d35af51d..102461d5 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -355,16 +355,9 @@ static void single_user (void) { rc_logger_close (); -#ifdef __linux__ - execl ("/sbin/telinit", "/sbin/telinit", "S", (char *) NULL); - eerrorx ("%s: unable to exec `/sbin/telinit': %s", + execl (SHUTDOWN, SHUTDOWN, "now", (char *) NULL); + eerrorx ("%s: unable to exec `" SHUTDOWN "': %s", applet, strerror (errno)); -#else - if (kill (1, SIGTERM) != 0) - eerrorx ("%s: unable to send SIGTERM to init (pid 1): %s", - applet, strerror (errno)); - exit (EXIT_SUCCESS); -#endif } static bool set_ksoftlevel (const char *level) |