NETPLUGD(8) | System Manager's Manual | NETPLUGD(8) |
netplugd
— network
cable hotplug management daemon
netplugd |
[-FP ] [-c
config_file] [-s
script_file] [-i
interface_pattern] [-p
pid_file] |
netplugd
is a daemon that responds to
network link events from the Linux kernel, such as a network interface
losing or acquiring a carrier signal.
When an Ethernet-style network interface on a host is plugged into a powered-up switch, hub, or other host, the two use a carrier signal to establish that the link is alive. The Linux kernel makes this information available through its netlink(7) interface.
The netplugd
daemon listens for carrier
detection and loss messages from the kernel's netlink(7)
subsystem. When a carrier signal is detected on an interface, it runs a
script to bring the interface up. When carrier is lost,
netplugd
runs a script to bring the interface down.
netplugd
does not define any policies for how to
manage interfaces; it leaves that to a script,
/etc/netplug.d/netplug, which is described in
FILES below.
You tell netplugd
which interfaces it
should manage by giving it a list of shell-style glob patterns, which it
matches against using the fnmatch(3) function. For
example, a pattern of eth[13] will tell
netplugd
to only manage eth1
and eth3, if those interfaces exist. If the
interfaces are not known to the kernel at the time you start
netplugd
, perhaps because they are unplugged PCMCIA
network interfaces or devices whose drivers have not yet been installed,
netplugd
will start to manage them as soon as they
are plugged in or their drivers are available.
-F
-P
netplugd
daemon normally probes for all possible interface names that might match
the patterns you tell it to manage. This is necessary in order to get
network driver modules (the default with almost all Linux distributions)
loaded and set up, so that they can provide link status notifications to
the netplugd
daemon. Autoprobing should always be
safe, and doesn't take long. Disable it with caution.-c
config_filenetplugd
will attempt to read from a default
config file. If you do not want netplugd
to try to
read from any real config files, you can specify
/dev/null as a config file.-s
script_file-i
interface_patternnetplugd
should manage. You can provide this
option multiple times to specify multiple patterns.-p
pid_filenetplugd
to run in the foreground,
this option is ignored.#
character ignored.
Patterns are standard shell-style glob patterns, e.g.
"eth[0-9]".netplugd
uses to probe for interfaces, and to
bring them up or down in response to network link events. This program is
called with the name of the interface as its first argument, and one of
the following options:
netplugd
daemon.netplugd
was written by
Bryan O'Sullivan
<bos@serpentine.com>.
Copyright 2003 PathScale, Inc. Copyright 2003, 2004, 2005 Bryan O'Sullivan
netplugd
is free software; you can
redistribute it and/or modify it under the terms of the GNU General Public
License, version 2, as published by the Free Software Foundation. You are
forbidden from redistributing or modifying it under the terms of any other
license, including other versions of the GNU General Public License.
netplugd
is distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
August 26, 2003 | Linux 2.6 |