X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=contrib%2Fpackage%2Ffreifunk-watchdog%2Fsrc%2Fwatchdog.h;fp=contrib%2Fpackage%2Ffreifunk-watchdog%2Fsrc%2Fwatchdog.h;h=71c10e9c1fcbbffb33950417fac8de0b5a315a73;hp=6d9ccf82c6f830e90946070167371900f78ed73a;hb=a0dbf69b83e932370562948146f08195c6cf130d;hpb=32acbdde47c5b0064da6618e693c8a77e48d3aec diff --git a/contrib/package/freifunk-watchdog/src/watchdog.h b/contrib/package/freifunk-watchdog/src/watchdog.h index 6d9ccf82c..71c10e9c1 100644 --- a/contrib/package/freifunk-watchdog/src/watchdog.h +++ b/contrib/package/freifunk-watchdog/src/watchdog.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ /* System load error action and treshold */ #define LOAD_TRESHOLD 15.00 -#define LOAD_ACTION "/sbin/reboot" +#define LOAD_ACTION "/sbin/reboot", "/sbin/reboot" /* Fallback binary name (passed by makefile) */ #ifndef BINARY @@ -107,22 +108,20 @@ iw_ioctl(int skfd, /* Socket to the kernel */ } /* fork() & execl() helper */ -#define EXEC(x) \ - do { \ - switch(fork()) \ - { \ - case -1: \ - syslog(LOG_CRIT, "Unable to fork child: %s", \ - strerror(errno)); \ - \ - break; \ - \ - case 0: \ - execl(x, NULL); \ - syslog(LOG_CRIT, "Unable to execute action: %s", \ - strerror(errno)); \ - \ - return 1; \ - } \ +#define EXEC(x) \ + do { \ + switch(fork()) \ + { \ + case -1: \ + syslog(LOG_CRIT, "Unable to fork child: %s", \ + strerror(errno)); \ + break; \ + \ + case 0: \ + execl(x, NULL); \ + syslog(LOG_CRIT, "Unable to execute action: %s", \ + strerror(errno)); \ + return 1; \ + } \ } while(0)