From 849b983c3fb6abec364d5e9e2519ef4ba1ea5df9 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 28 Aug 2007 09:17:04 +0000 Subject: #define shutdown --- src/rc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rc.c b/src/rc.c index 967694ea..08d75262 100644 --- a/src/rc.c +++ b/src/rc.c @@ -43,6 +43,8 @@ #define INITSH RC_LIBDIR "/sh/init.sh" #define INITEARLYSH RC_LIBDIR "/sh/init-early.sh" #define HALTSH RC_INITDIR "/halt.sh" + +#define SHUTDOWN "/sbin/shutdown" #define SULOGIN "/sbin/sulogin" #define INTERACTIVE RC_SVCDIR "/interactive" @@ -944,22 +946,22 @@ int main (int argc, char **argv) if (! RUNLEVEL || strcmp (RUNLEVEL, "6") != 0) { - execl ("/sbin/shutdown", "/sbin/shutdown", "-r", "now", (char *) NULL); - eerrorx ("%s: unable to exec `/sbin/shutdown': %s", + execl (SHUTDOWN, SHUTDOWN, "-r", "now", (char *) NULL); + eerrorx ("%s: unable to exec `" SHUTDOWN "': %s", applet, strerror (errno)); } } else if (strcmp (newlevel, RC_LEVEL_SHUTDOWN) == 0) { if (! RUNLEVEL || strcmp (RUNLEVEL, "0") != 0) { - execl ("/sbin/shutdown", "/sbin/shutdown", + execl (SHUTDOWN, SHUTDOWN, #ifdef __linux "-h", #else "-p", #endif "now", (char *) NULL); - eerrorx ("%s: unable to exec `/sbin/shutdown': %s", + eerrorx ("%s: unable to exec `" SHUTDOWN "': %s", applet, strerror (errno)); } } -- cgit v1.2.3