]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Improve logging of script exiting.
authorRoy Marples <roy@marples.name>
Sun, 11 Nov 2012 12:19:19 +0000 (12:19 +0000)
committerRoy Marples <roy@marples.name>
Sun, 11 Nov 2012 12:19:19 +0000 (12:19 +0000)
configure
configure.c

index 32a4dfd024fe37450c0d49fc0f80e2df81885dcb..a0bee323f808251d78d4a96ea167d3714a19051a 100755 (executable)
--- a/configure
+++ b/configure
@@ -240,7 +240,7 @@ fi
 
 case "$OS" in
 linux)
-       echo "CPPFLAGS+=        -D_BSD_SOURCE -D_XOPEN_SOURCE=600" >>$CONFIG_MK
+       echo "CPPFLAGS+=        -D_BSD_SOURCE -D_XOPEN_SOURCE=700" >>$CONFIG_MK
        echo "SRCS+=            if-linux.c if-linux-wireless.c lpf.c" >>$CONFIG_MK
        echo "SRCS+=            platform-linux.c" >>$CONFIG_MK
        echo "LDADD+=           -lrt" >>$CONFIG_MK
index 03e245554dae1055c6f2beefa8d19f1ff6a6a0fc..eb8155b0d6471172ce9ae0633b49457a45c21315 100644 (file)
@@ -435,9 +435,14 @@ run_script_reason(const struct interface *iface, const char *reason)
                                break;
                        }
                }
-               if (WEXITSTATUS(status) == 127)
-                       syslog(LOG_ERR, "exec_script: %s: WEXITSTATUS %d",
-                           argv[0], WEXITSTATUS(status));
+               if (WIFEXITED(status)) {
+                       if (WEXITSTATUS(status))
+                               syslog(LOG_ERR,
+                                   "exec_script: %s: WEXITSTATUS %d",
+                                   argv[0], WEXITSTATUS(status));
+               } else if (WIFSIGNALED(status))
+                       syslog(LOG_ERR, "exec_sript: %s: %s",
+                           argv[0], strsignal(WTERMSIG(status)));
        }
 
        /* Send to our listeners */