#define shutdown
This commit is contained in:
parent
d6acd7d83e
commit
849b983c3f
10
src/rc.c
10
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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user