summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2020-08-06 10:36:32 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-08-06 10:36:44 +0200
commit5286c93d69500377ada66cd9393ab2c722f62678 (patch)
treecf9df25e07e9173649f3f1f197b5a07bdea169c0 /src/rest.c
parent139633a3347f62a028a593540c65c0e46f1d736c (diff)
#980 error reporting in setclientmode
Add syslog and use exit()
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rest.c b/src/rest.c
index 5f5e3f5..ec6ca63 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -986,7 +986,9 @@ static int og_set_client_mode(struct og_dbi *dbi, const char *mac,
if (fork() == 0) {
execlp("/bin/bash", "/bin/bash",
"/opt/opengnsys/bin/setclientmode", filename, NULL);
- _exit(1);
+ syslog(LOG_ERR, "failed script execution (%s:%d)\n",
+ __func__, __LINE__);
+ exit(EXIT_FAILURE);
} else {
wait(&status);
}