aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rwxr-xr-xnetwork15
1 files changed, 14 insertions, 1 deletions
diff --git a/network b/network
index d10c2ad..1513c58 100755
--- a/network
+++ b/network
@@ -12,6 +12,19 @@
# look for dhcpcd settings
[ -f /etc/conf.d/dhcpcd ] && . /etc/conf.d/dhcpcd
+# Special wrapper for hotplug ifup calls
+# (make sure hotplug doesn't bring up disabled interfaces)
+hotplug_ifup()
+{
+ [ "$1" != "" ] || return 1
+ for ifline in ${INTERFACES[@]}; do
+ # if the interface is disabled then this will be skipped
+ if [ "$ifline" = "$1" ]; then
+ ifup $ifline
+ fi
+ done
+}
+
ifup()
{
if [ "$1" = "" ]; then
@@ -173,7 +186,7 @@ case "$1" in
/bin/sleep 2
$0 start
;;
- ifup|ifdown|iflist|rtup|rtdown|rtlist)
+ hotplug_ifup|ifup|ifdown|iflist|rtup|rtdown|rtlist)
$1 $2
;;
*)