1ifplugd(8)                  System Manager's Manual                 ifplugd(8)
2
3
4

NAME

6       ifplugd - A link detection daemon for ethernet devices
7

SYNOPSIS

9       ifplugd [options]
10

DESCRIPTION

12       ifplugd  is  a  daemon which will automatically configure your ethernet
13       device when a cable is plugged in and automatically unconfigure  it  if
14       the  cable  is  pulled. This is useful on laptops with on-board network
15       adapters, since it will only configure the interface when  a  cable  is
16       really connected.
17
18       It  uses  your  distribution's  native ifup/ifdown programs, but can be
19       configured to do anything you wish when  the  state  of  the  interface
20       changes.  It  may  ignore short unplugged whiles (-d option) or plugged
21       whiles (-u option).
22
23       ifplugd may be used in "compatibility mode" by  specifying  -F  on  the
24       command line. Than ifplugd will treat network drivers which do not sup‐
25       port link beat querying as always online.
26

OPTIONS

28       -a | --no-auto
29              Do not enable interface automatically (default: off)
30
31       -n | --no-daemon
32              Do not daemonize (for debugging) (default: off)
33
34       -s | --no-syslog
35              Do not use syslog, use stdout instead (for debugging)  (default:
36              off).
37
38       -b | --no-beep
39              Do not beep (off)
40
41       -f | --ignore-fail
42              Ignore  detection  failure, retry instead. Failure is treated as
43              "no link". (default: off)
44
45       -F | --ignore-fail-positive
46              Ignore detection failure, retry instead. Failure is  treated  as
47              "link detected". (default: off)
48
49       -i | --iface= IFACE
50              Specify ethernet interface (default: eth0)
51
52       -r | --run= EXEC
53              Specify  program  to  execute when link status changes (default:
54              /etc/ifplugd/ifplugd.action)
55
56       -I | --ignore-retval
57              Don't exit on nonzero return value of program executed  on  link
58              change. (default: off)
59
60       -t | --poll-time= SECS
61              Specify poll time in seconds (default: 1)
62
63       -u | --delay-up= SECS
64              Specify delay for configuring interface (default: 0)
65
66       -d | --delay-down= SECS
67              Specify delay for deconfiguring interface (default: 5)
68
69       -m | --api-mode= MODE
70              Force  a specific link beat detection ioctl() API. Possible val‐
71              ues are auto, iff, wlan, ethtool, mii, and  priv  for  automatic
72              detection,  interface  flag  (IFF_RUNNING),  wireless extension,
73              SIOCETHTOOL, SIOCGMIIREG resp. SIOCPRIV. Only the first  charac‐
74              ter  of  the  argument  is relevant, case insensitive. (default:
75              auto)
76
77       -p | --no-startup
78              Don't call the script  to  bring  up  network  on  deamon  start
79              (default: off)
80
81       -q | --no-shutdown
82              Don't  call  the  script  for  network  shutdown  on deamon quit
83              (default: off)
84
85       -w | --wait-on-fork
86              When daemonizing, wait until  the  background  process  finished
87              with  the initial link beat detection. When this is enabled, the
88              parent process will return the link status on exit. 1 means link
89              beat  detected,  2 stands for link beat not detected, everything
90              else is an error.
91
92       -W | --wait-on-kill
93              When killing a running daemon (with -k) wait  until  the  daemon
94              died.
95
96       -x | --extra-arg= ARG
97              Specify an extra argument to be passed to the action script.
98
99       -M | --monitor
100              Don't  fail when the network interface is not available, instead
101              use NETLINK to monitor device avaibility. The is useful for PCM‐
102              CIA devices and similar.
103
104       -h | --help
105              Show help
106
107       -k | --kill
108              Kill  a running daemon (Specify -i to select the daemon instance
109              to kill)
110
111       -c | --check-running
112              Check if a daemon is running for a given network interface. Sets
113              the  return  value to 0 if a daemon is already running or to 255
114              if not.
115
116       -v | --version
117              Show version
118
119       -S | --supend
120              Suspend a running daemon. The daemon will no  longer  check  the
121              link  status  until  it  is  resumed  (-R) again. (Specify -i to
122              select the daemon instance to suspend.)
123
124       -R | --resume
125              Resume a suspended daemon. (Specify  -i  to  select  the  daemon
126              instance to resume.)
127
128       -z | --info
129              Request that a running daemon shall write its status information
130              to syslog. (Specify -i to select the daemon instance to send the
131              request to.)
132

FILES

134       /etc/ifplugd/ifplugd.conf:  this  file  is  sourced  by the init script
135       /etc/init.d/ifplugd and contains the interface to be monitored and  the
136       options to be used.
137
138       /etc/ifplugd/ifplugd.action: this is the script which will be called by
139       the daemon whenever the state of the interface changes.  It  takes  two
140       areguments:  the  first  is  the  interface name (eg. eth0), the second
141       either "up" or "down".
142
143       /var/run/ifplugd.<iface>.pid: the pid file for ifplugd.
144

ENVIRONMENT

146       The action script will be called with two environment variables set:
147
148       IFPLUGD_PREVIOUS The previous link status. Either "up", "down", "error"
149       or  "disabled".  The former values should be obvious, the latter is set
150       on daemon startup.
151
152       IFPLUGD_CURRENT The current link status. See above for possible values.
153

SIGNALS

155       SIGINT, SIGTERM  ifplugd  will  quit,  possibly  running  the  shutdown
156       script. This is issued by passing -k to ifplugd.
157
158       SIGQUIT ifplugd will quit, the shutdown script is never run.
159
160       SIGHUP  ifplugd  will  write  its status information to syslog. This is
161       issued by -z.
162
163       SIGUSR1 ifplugd will go to suspend mode. (-S)
164
165       SIGUSR2 ifplugd will resume from suspend mode. (-R)
166

AUTHOR

168       ifplugd was written by  Lennart  Poettering  <mzvscyhtq  (at)  0pointer
169       (dot)         de>.         ifplugd        is        available        at
170       http://0pointer.de/lennart/projects/ifplugd/
171

SEE ALSO

173       ifplugd.conf(5), ifup(8), interfaces(5), ifconfig(8), ifplugstatus(8)
174

COMMENTS

176       This man page was written using xmltoman(1) by Oliver Kurth.
177
178
179
180Manuals                              User                           ifplugd(8)
Impressum