summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-scripts/net.modules.d/netplugd')
-rw-r--r--net-scripts/net.modules.d/netplugd30
1 files changed, 8 insertions, 22 deletions
diff --git a/net-scripts/net.modules.d/netplugd b/net-scripts/net.modules.d/netplugd
index 60bf47a..a079c3f 100644
--- a/net-scripts/net.modules.d/netplugd
+++ b/net-scripts/net.modules.d/netplugd
@@ -45,29 +45,15 @@ netplugd_pre_start() {
return 0
fi
- # We don't work on bridges
- if is_function bridge_exists ; then
- if bridge_exists "${iface}"; then
- veinfo "netplug does not work on bridges"
- return 0
+ # We don't work on bonded, bridges, tun/tap, vlan or wireless
+ for f in bonding bridge tuntap vlan wireless ; do
+ if is_function "${f}_exists" ; then
+ if ${f}_exists "${iface}" ; then
+ veinfo "netplug does not work with ${f}"
+ return 0
+ fi
fi
- fi
-
- # We don't work on tun/tap interfaces
- if is_function tuntap_exists ; then
- if tuntap_exists "${iface}"; then
- veinfo "netplug does not work on tun/tap interfaces"
- return 0
- fi
- fi
-
- # We don't work on wirelesss interfaces
- if is_function wireless_check_extensions ; then
- if wireless_check_extensions "${iface}"; then
- veinfo "netplug does not work on wireless interfaces"
- return 0
- fi
- fi
+ done
ebegin "Starting netplug on ${iface}"