We should use shutdown to goto single user mode.

This commit is contained in:
Roy Marples 2008-03-01 10:38:47 +00:00
parent baf217acc7
commit 2f3ffd053f

View File

@ -355,16 +355,9 @@ static void single_user (void)
{ {
rc_logger_close (); rc_logger_close ();
#ifdef __linux__ execl (SHUTDOWN, SHUTDOWN, "now", (char *) NULL);
execl ("/sbin/telinit", "/sbin/telinit", "S", (char *) NULL); eerrorx ("%s: unable to exec `" SHUTDOWN "': %s",
eerrorx ("%s: unable to exec `/sbin/telinit': %s",
applet, strerror (errno)); 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) static bool set_ksoftlevel (const char *level)