X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=signal.c;h=07dda9a4c890e9106a56ec089c6f8bfcdefb22a0;hp=16824f7251b5c01344c4f1dd939ed0daef9ac022;hb=7c6cf551df1eb4b59b2576c73db7ad30ac4ce396;hpb=3ff99010e61a0299257ffc91467a16d278a7e774 diff --git a/signal.c b/signal.c index 16824f7..07dda9a 100644 --- a/signal.c +++ b/signal.c @@ -35,6 +35,7 @@ static void signal_shutdown(int signal, siginfo_t *siginfo, void *data) int event = 0; char *msg = NULL; +#ifndef DISABLE_INIT switch(signal) { case SIGINT: case SIGTERM: @@ -47,6 +48,7 @@ static void signal_shutdown(int signal, siginfo_t *siginfo, void *data) msg = "poweroff"; break; } +#endif DEBUG(1, "Triggering %s\n", msg); if (event) @@ -93,5 +95,7 @@ void procd_signal(void) sigaction(SIGHUP, &sa_dummy, NULL); sigaction(SIGKILL, &sa_dummy, NULL); sigaction(SIGSTOP, &sa_dummy, NULL); +#ifndef DISABLE_INIT reboot(RB_DISABLE_CAD); +#endif }