source: MondoRescue/branches/2.2.9/mindi-busybox/examples/var_service/ifplugd_if/run@ 3320

Last change on this file since 3320 was 3320, checked in by Bruno Cornec, 9 years ago
  • Re-add (thanks git BTW) the 2.2.9 branch which had been destroyed in the move to 3.0
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/sh
2
3#exec >/dev/null
4exec 2>&1
5exec </dev/null
6
7pwd="$PWD"
8
9if="${PWD##*/ifplugd_}"
10
11echo "* Starting ifplugd on $if [$$]"
12exec \
13env - PATH="$PATH" \
14softlimit \
15setuidgid root \
16ifplugd -apqns -t3 -u8 -d8 -i "$if" -r "$pwd/ifplugd_handler"
17
18# We use -t3 to wake ifplugd up less often.
19# If after three tests (3*3=9 > 8) link state seen to be different,
20# the handler will be called.
21# IOW: short link losses will be ignored, longer ones
22# will trigger DHCP reconfiguration and such (see handler code).
23
24#-a Do not up interface automatically
25#-p Dont run script on daemon startup
26#-q Dont run script on daemon quit
27#-n Do not daemonize
28#-s Do not log to syslog
29#-t SECS Poll time in seconds
30#-u SECS Delay before running script after link up
31#-d SECS Delay after link down
32#-i IFACE Interface
33#-r PROG Script to run
34#-f/-F Treat link detection error as link down/link up (otherwise exit on error)
35#-M Monitor creation/destruction of interface (otherwise it must exist)
36#-x ARG Extra argument for script
37#-I Dont exit on nonzero exit code from script
38#-l Run script on startup even if no cable is detected
39#-m MODE API mode (mii, priv, ethtool, wlan, auto)
Note: See TracBrowser for help on using the repository browser.