ip link: add VLAN support
[oweals/busybox.git] / networking / ifplugd.c
index d8358cdfd5f92d25ae70a0d2b34236c897dd40c4..3cdc2c9d29e58b27bd79749b5ec3c3b9ac71da38 100644 (file)
@@ -22,9 +22,9 @@
 //usage:     "\n       -r PROG         Script to run"
 //usage:     "\n       -x ARG          Extra argument for script"
 //usage:     "\n       -I              Don't exit on nonzero exit code from script"
-//usage:     "\n       -p              Don't run script on daemon startup"
-//usage:     "\n       -q              Don't run script on daemon quit"
-//usage:     "\n       -l              Run script on startup even if no cable is detected"
+//usage:     "\n       -p              Don't run \"up\" script on startup"
+//usage:     "\n       -q              Don't run \"down\" script on exit"
+//usage:     "\n       -l              Always run script on startup"
 //usage:     "\n       -t SECS         Poll time in seconds"
 //usage:     "\n       -u SECS         Delay before running script after link up"
 //usage:     "\n       -d SECS         Delay after link down"
@@ -551,12 +551,13 @@ int ifplugd_main(int argc UNUSED_PARAM, char **argv)
        applet_name = xasprintf("ifplugd(%s)", G.iface);
 
 #if ENABLE_FEATURE_PIDFILE
-       pidfile_name = xasprintf(_PATH_VARRUN"ifplugd.%s.pid", G.iface);
+       pidfile_name = xasprintf(CONFIG_PID_FILE_PATH "/ifplugd.%s.pid", G.iface);
        pid_from_pidfile = read_pid(pidfile_name);
 
        if (opts & FLAG_KILL) {
                if (pid_from_pidfile > 0)
-                       kill(pid_from_pidfile, SIGQUIT);
+                       /* Upstream tool use SIGINT for -k */
+                       kill(pid_from_pidfile, SIGINT);
                return EXIT_SUCCESS;
        }