ifplugd(8)

πŸ“¦
version 0.28 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

okay so this page is ifplugd(8), and it lives in the System Manager's Manual section of the manual pages. no cap, it's a whole vibe. let's get into it 🫢


✨ NAME ✨

ifplugd β€” a link detection daemon for ethernet devices πŸ¦‹


✨ SYNOPSIS ✨

ifplugd [options]

✨ DESCRIPTION ✨

so basically ifplugd is a daemon that automatically configures your ethernet device when a cable gets plugged in, and automatically unconfigures it when the cable gets pulled. it's giving "i'll handle it, don't worry about it." πŸ’…

this is especially iconic on laptops with on-board network adapters, because it will only configure the interface when a cable is really truly actually connected. not just because it's there. it's got standards. ✨

it uses your distribution's native ifup/ifdown programs, but bestie, you can configure it to do literally anything you want when the state of the interface changes. it can also ignore short unplugged whiles (-d option) or short plugged whiles (-u option) β€” so it's not out here overreacting to every little blip. main character emotional regulation fr fr. 🌸

ifplugd may also be used in "compatibility mode" by specifying -F on the command line. in that mode, ifplugd will treat network drivers that don't support link beat querying as always online. no cap, it just assumes the best. πŸ™ˆ


✨ OPTIONS ✨

  • -a, --no-auto β€” do not enable the interface automatically (default: off)
  • -n, --no-daemon β€” do not daemonize (for debugging) (default: off)
  • -s, --no-syslog β€” do not use syslog, use stdout instead (for debugging) (default: off)
  • -b, --no-beep β€” do not beep (off), and this one overrides --no-beep-up and --no-beep-down
  • -U, --no-beep-up β€” do not beep on interface up (off)
  • -D, --no-beep-down β€” do not beep on interface down (off)
  • -f, --ignore-fail β€” ignore detection failure, retry instead. failure is treated as "no link". (default: off)
  • -F, --ignore-fail-positive β€” ignore detection failure, retry instead. failure is treated as "link detected". (default: off)
  • -i, --iface= IFACE β€” specify the ethernet interface (default: eth0)
  • -r, --run= EXEC β€” specify the program to execute when link status changes (default: /etc/ifplugd/ifplugd.action)
  • -I, --ignore-retval β€” don't exit on a nonzero return value from the program executed on link change. (default: off)
  • -t, --poll-time= SECS β€” specify poll time in seconds (default: 1)
  • -T, --poll-utime= USECS β€” specify poll time in microseconds, added to -t (default: 0)
  • -u, --delay-up= SECS β€” specify delay for configuring the interface (default: 0)
  • -d, --delay-down= SECS β€” specify delay for deconfiguring the interface (default: 5)
  • -m, --api-mode= MODE β€” 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, and it's case insensitive. (default: auto)
  • -p, --no-startup β€” don't call the script to bring up the network on daemon start (default: off)
  • -q, --no-shutdown β€” don't call the script for network shutdown on daemon quit (default: off)
  • -w, --wait-on-fork β€” 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, and everything else is an error.
  • -W, --wait-on-kill β€” when killing a running daemon (with -k), wait until the daemon died.
  • -x, --extra-arg= ARG β€” specify an extra argument to be passed to the action script.
  • -M, --monitor β€” don't fail when the network interface is not available, instead use NETLINK to monitor device availability. this is useful for PCMCIA devices and similar. πŸ’œ
  • -h, --help β€” show help
  • -k, --kill β€” kill a running daemon (specify -i to select the daemon instance to kill)
  • -c, --check-running β€” 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.
  • -v, --version β€” show version
  • -S, --supend β€” 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.)
  • -R, --resume β€” resume a suspended daemon. (specify -i to select the daemon instance to resume.)
  • -z, --info β€” request that a running daemon shall write its status information to syslog. (specify -i to select the daemon instance to send the request to.)
and yes bestie, --supend is spelled exactly like that in the original. i am not touching it. i respect it. πŸ’…

✨ 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 that will be called by the daemon whenever the state of the interface changes. it takes two arguments: the first is the interface name (eg. eth0), and the second is 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, and 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, and 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.


and that's the whole thing, bestie 🌈 so the footer of this page says it comes from Manuals, it's a User page, and it's titled ifplugd(8). go plug in a cable and let the daemon do its thing. slay. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from