small cleanup
[openwrt.git] / package / base-files / files / lib / network / config.sh
index 2b15749..cab2e06 100755 (executable)
@@ -24,6 +24,7 @@ find_config() {
 }
 
 scan_interfaces() {
 }
 
 scan_interfaces() {
+       local cfgfile="$1"
        local mode iftype iface ifname device
        interfaces=
        config_cb() {
        local mode iftype iface ifname device
        interfaces=
        config_cb() {
@@ -50,7 +51,7 @@ scan_interfaces() {
                        ;;
                esac
        }
                        ;;
                esac
        }
-       config_load network
+       config_load "${cfgfile:-network}"
 }
 
 add_vlan() {
 }
 
 add_vlan() {
@@ -157,7 +158,7 @@ setup_interface() {
                                done
                        }
 
                                done
                        }
 
-                       env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug "iface" &
+                       env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
                ;;
                dhcp)
                        # prevent udhcpc from starting more than once
                ;;
                dhcp)
                        # prevent udhcpc from starting more than once
@@ -195,7 +196,8 @@ setup_interface() {
 unbridge() {
        local dev="$1"
        local brdev
 unbridge() {
        local dev="$1"
        local brdev
-
+       
+       [ -x /usr/sbin/brctl ] || return 0
        brctl show | grep "$dev" >/dev/null && {
                # interface is still part of a bridge, correct that
 
        brctl show | grep "$dev" >/dev/null && {
                # interface is still part of a bridge, correct that
 
This page took 0.023819 seconds and 4 git commands to generate.