diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-03-30 11:14:46 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-03-30 11:14:46 +0200 |
commit | d892f7137f43373123ab6c63006b5ff9b3481664 (patch) | |
tree | c383a381aa7f5aa24bf73fe3509f9674ddbca934 | |
parent | 2adaa90534d7c4b189b3ce5d32262cdb7f990dfb (diff) | |
download | busybox-w32-d892f7137f43373123ab6c63006b5ff9b3481664.tar.gz busybox-w32-d892f7137f43373123ab6c63006b5ff9b3481664.tar.bz2 busybox-w32-d892f7137f43373123ab6c63006b5ff9b3481664.zip |
ifplugd service example: always run up/down script on startup
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-x | examples/var_service/ifplugd_if/run | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/var_service/ifplugd_if/run b/examples/var_service/ifplugd_if/run index c4f766e88..fade8b98d 100755 --- a/examples/var_service/ifplugd_if/run +++ b/examples/var_service/ifplugd_if/run | |||
@@ -16,7 +16,7 @@ exec \ | |||
16 | env - PATH="$PATH" \ | 16 | env - PATH="$PATH" \ |
17 | softlimit \ | 17 | softlimit \ |
18 | setuidgid root \ | 18 | setuidgid root \ |
19 | ifplugd -apqns -t3 -u8 -d8 -i "$if" -r "$pwd/ifplugd_handler" | 19 | ifplugd -apqlns -t3 -u8 -d8 -i "$if" -r "$pwd/ifplugd_handler" |
20 | 20 | ||
21 | # We use -t3 to wake ifplugd up less often. | 21 | # We use -t3 to wake ifplugd up less often. |
22 | # If after three tests (3*3=9 > 8) link state seen to be different, | 22 | # If after three tests (3*3=9 > 8) link state seen to be different, |
@@ -24,19 +24,20 @@ ifplugd -apqns -t3 -u8 -d8 -i "$if" -r "$pwd/ifplugd_handler" | |||
24 | # IOW: short link losses will be ignored, longer ones | 24 | # IOW: short link losses will be ignored, longer ones |
25 | # will trigger DHCP reconfiguration and such (see handler code). | 25 | # will trigger DHCP reconfiguration and such (see handler code). |
26 | 26 | ||
27 | #-a Do not up interface automatically | 27 | #-a Don't up interface automatically |
28 | #-p Dont run script on daemon startup | 28 | #-p Don't run "up" script on startup |
29 | #-q Dont run script on daemon quit | 29 | #-q Don't run "down" script on exit |
30 | #-l Always run script on startup | ||
30 | #-n Do not daemonize | 31 | #-n Do not daemonize |
31 | #-s Do not log to syslog | 32 | #-s Do not log to syslog |
32 | #-t SECS Poll time in seconds | 33 | #-t SECS Poll time in seconds |
33 | #-u SECS Delay before running script after link up | 34 | #-u SECS Delay before running script after link up |
34 | #-d SECS Delay after link down | 35 | #-d SECS Delay after link down |
35 | #-i IFACE Interface | 36 | #-i IFACE Interface |
36 | #-r PROG Script to run | ||
37 | #-f/-F Treat link detection error as link down/link up (otherwise exit on error) | ||
38 | #-M Monitor creation/destruction of interface (otherwise it must exist) | 37 | #-M Monitor creation/destruction of interface (otherwise it must exist) |
38 | #-r PROG Script to run | ||
39 | #-x ARG Extra argument for script | 39 | #-x ARG Extra argument for script |
40 | #-I Dont exit on nonzero exit code from script | 40 | #-I Don't exit on nonzero exit code from script |
41 | #-l Run script on startup even if no cable is detected | 41 | #-f/-F Treat link detection error as link down/link up (otherwise exit on error) |
42 | #-m MODE API mode (mii, priv, ethtool, wlan, auto) | 42 | #-m MODE API mode (mii, priv, ethtool, wlan, auto) |
43 | #-k Kill running daemon | ||