source: MondoRescue/branches/3.3/mindi-busybox/examples/var_service/ifplugd_if/run

Last change on this file was 3621, checked in by Bruno Cornec, 10 years ago

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

  • Property svn:executable set to *
File size: 1.2 KB
RevLine 
[2725]1#!/bin/sh
2
3#exec >/dev/null
4exec 2>&1
5exec </dev/null
6
7pwd="$PWD"
8
9if="${PWD##*/ifplugd_}"
10
[3621]11echo "* Upping iface $if"
12ip link set dev "$if" up
13
[2725]14echo "* Starting ifplugd on $if [$$]"
15exec \
16env - PATH="$PATH" \
17softlimit \
18setuidgid root \
19ifplugd -apqns -t3 -u8 -d8 -i "$if" -r "$pwd/ifplugd_handler"
20
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,
23# the handler will be called.
24# IOW: short link losses will be ignored, longer ones
25# will trigger DHCP reconfiguration and such (see handler code).
26
27#-a Do not up interface automatically
28#-p Dont run script on daemon startup
29#-q Dont run script on daemon quit
30#-n Do not daemonize
31#-s Do not log to syslog
32#-t SECS Poll time in seconds
33#-u SECS Delay before running script after link up
34#-d SECS Delay after link down
35#-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)
39#-x ARG Extra argument for script
40#-I Dont exit on nonzero exit code from script
41#-l Run script on startup even if no cable is detected
42#-m MODE API mode (mii, priv, ethtool, wlan, auto)
Note: See TracBrowser for help on using the repository browser.