X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/ecdddd60656db2fa84e0e84a7e82378a7202da6c..dac7fe82bb8d933fb3a68cb9c0256dac6f4470ae:/garden.c diff --git a/garden.c b/garden.c index ea5bb99..863114e 100644 --- a/garden.c +++ b/garden.c @@ -3,6 +3,9 @@ #include #include #include +#include +#include + #include "l2tpns.h" #include "plugin.h" #include "control.h" @@ -157,7 +160,7 @@ int plugin_become_master(void) for (i = 0; up_commands[i] && *up_commands[i]; i++) { f->log(3, 0, 0, "Running %s\n", up_commands[i]); - int status = system(up_commands[i]); + if (-1 == system(up_commands[i])) f->log(0, 0, 0, "error command %s\n", up_commands[i]); } return PLUGIN_RET_OK; @@ -273,7 +276,7 @@ int plugin_init(struct pluginfuncs *funcs) for (i = 0; down_commands[i] && *down_commands[i]; i++) { f->log(3, 0, 0, "Running %s\n", down_commands[i]); - int status = system(down_commands[i]); + if (-1 == system(down_commands[i])) f->log(0, 0, 0, "error command %s\n", down_commands[i]); } } @@ -290,7 +293,7 @@ void plugin_done() for (i = 0; down_commands[i] && *down_commands[i]; i++) { f->log(3, 0, 0, "Running %s\n", down_commands[i]); - int status = system(down_commands[i]); + if (-1 == system(down_commands[i])) f->log(0, 0, 0, "error command %s\n", down_commands[i]); } }