aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/rc.c11
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)