Scroll to navigation

ifplugd(8) System Manager's Manual ifplugd(8)

NAME

ifplugd - A link detection daemon for ethernet devices

SYNOPSIS

ifplugd [options]

DESCRIPTION

ifplugd is a daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with on-board network adapters, since it will only configure the interface when a cable is really connected.

It uses your distribution's native ifup/ifdown programs, but can be configured to do anything you wish when the state of the interface changes. It may ignore short unplugged whiles (-d option) or plugged whiles (-u option).

ifplugd may be used in "compatibility mode" by specifying -F on the command line. Than ifplugd will treat network drivers which do not support link beat querying as always online.

OPTIONS

Do not enable interface automatically (default: off)
Do not daemonize (for debugging) (default: off)
Do not use syslog, use stdout instead (for debugging) (default: off).
Do not beep (off), overrides --no-beep-up and --no-beep-down.
Do not beep on interface up (off)
Do not beep on interface down (off)
Ignore detection failure, retry instead. Failure is treated as "no link". (default: off)
Ignore detection failure, retry instead. Failure is treated as "link detected". (default: off)
Specify ethernet interface (default: eth0)
Specify program to execute when link status changes (default: /etc/ifplugd/ifplugd.action)
Don't exit on nonzero return value of program executed on link change. (default: off)
Specify poll time in seconds (default: 1)
Specify poll time in microseconds, added to -t (default: 0)
Specify delay for configuring interface (default: 0)
Specify delay for deconfiguring interface (default: 5)
Force a specific link beat detection ioctl() API. Possible values are auto, iff, wlan, ethtool, mii, and priv for automatic detection, interface flag (IFF_RUNNING), wireless extension, SIOCETHTOOL, SIOCGMIIREG resp. SIOCPRIV. Only the first character of the argument is relevant, case insensitive. (default: auto)
Don't call the script to bring up network on deamon start (default: off)
Don't call the script for network shutdown on deamon quit (default: off)
When daemonizing, wait until the background process finished with the initial link beat detection. When this is enabled, the parent process will return the link status on exit. 2 means link beat detected, 3 stands for link beat not detected, everything else is an error.
When killing a running daemon (with -k) wait until the daemon died.
Specify an extra argument to be passed to the action script.
Don't fail when the network interface is not available, instead use NETLINK to monitor device avaibility. The is useful for PCMCIA devices and similar.
Show help
Kill a running daemon (Specify -i to select the daemon instance to kill)
Check if a daemon is running for a given network interface. Sets the return value to 0 if a daemon is already running or to 255 if not.
Show version
Suspend a running daemon. The daemon will no longer check the link status until it is resumed (-R) again. (Specify -i to select the daemon instance to suspend.)
Resume a suspended daemon. (Specify -i to select the daemon instance to resume.)
Request that a running daemon shall write its status information to syslog. (Specify -i to select the daemon instance to send the request to.)

FILES

/etc/default/ifplugd: this file is sourced by the init script /etc/init.d/ifplugd and contains the interface to be monitored and the options to be used.

/etc/ifplugd/ifplugd.action: this is the script which will be called by the daemon whenever the state of the interface changes. It takes two areguments: the first is the interface name (eg. eth0), the second either "up" or "down".

/var/run/ifplugd.<iface>.pid: the pid file for ifplugd.

ENVIRONMENT

The action script will be called with two environment variables set:

IFPLUGD_PREVIOUS The previous link status. Either "up", "down", "error" or "disabled". The former values should be obvious, the latter is set on daemon startup.

IFPLUGD_CURRENT The current link status. See above for possible values.

SIGNALS

SIGINT, SIGTERM ifplugd will quit, possibly running the shutdown script. This is issued by passing -k to ifplugd.

SIGQUIT ifplugd will quit, the shutdown script is never run.

SIGHUP ifplugd will write its status information to syslog. This is issued by -z.

SIGUSR1 ifplugd will go to suspend mode. (-S)

SIGUSR2 ifplugd will resume from suspend mode. (-R)

AUTHOR

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

SEE ALSO

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

COMMENTS

This man page was written using xmltoman(1) by Oliver Kurth.

User Manuals