diff options
author | Roy Marples <roy@marples.name> | 2007-08-28 09:17:04 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-08-28 09:17:04 +0000 |
commit | 849b983c3fb6abec364d5e9e2519ef4ba1ea5df9 (patch) | |
tree | dccef9e2bbe271228d64fc6377255927a1d526d3 /src | |
parent | d6acd7d83e2693e0afb12a8a6400e491bb1dda65 (diff) |
#define shutdown
Diffstat (limited to 'src')
-rw-r--r-- | src/rc.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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)); } } |