diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-08-23 18:47:31 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-08-23 18:47:31 +0000 |
commit | a8a833f845c7cf981ad46255271ef605098afd08 (patch) | |
tree | dfc75130702d9042aaefe6ad695241945b520a96 /package/base-files/default/lib/network | |
parent | 5f28d6150ea16e19d1d528ae07dd9ac0ac296d51 (diff) |
change 'ifnames' to 'ifname' in network config, fix #697
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4638 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/default/lib/network')
-rwxr-xr-x | package/base-files/default/lib/network/config.sh | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/package/base-files/default/lib/network/config.sh b/package/base-files/default/lib/network/config.sh index 690d7996e..0cd6cb889 100755 --- a/package/base-files/default/lib/network/config.sh +++ b/package/base-files/default/lib/network/config.sh @@ -8,11 +8,6 @@ find_config() { for ifn in $interfaces; do config_get iftype "$ifn" type config_get iface "$ifn" ifname - case "$iftype" in - bridge) - config_get iface "$ifn" ifnames - ;; - esac config_get device "$ifn" device for ifc in ${device:-$iface}; do [ "$ifc" = "$1" ] && { @@ -32,17 +27,9 @@ scan_interfaces() { config_get iftype "$CONFIG_SECTION" TYPE case "$iftype" in interface) - config_get iftype "$CONFIG_SECTION" type - config_get mode "$CONFIG_SECTION" proto - case "$iftype" in - bridge) - config_get iface "$CONFIG_SECTION" ifname - iface="${iface:-br-$CONFIG_SECTION}" - config_set "$CONFIG_SECTION" ifname "$iface" - ;; - esac + config_get proto "$CONFIG_SECTION" proto append interfaces "$CONFIG_SECTION" - ( type "scan_$mode" ) >/dev/null 2>/dev/null && eval "scan_$mode '$CONFIG_SECTION'" + ( type "scan_$proto" ) >/dev/null 2>/dev/null && eval "scan_$proto '$CONFIG_SECTION'" ;; esac } @@ -80,16 +67,15 @@ setup_interface() { # Setup bridging case "$iftype" in bridge) - config_get bridge_ifname "$config" ifname ifconfig "$iface" up 2>/dev/null >/dev/null - ifconfig "$bridge_ifname" 2>/dev/null >/dev/null && { - $DEBUG brctl addif "$bridge_ifname" "$iface" + ifconfig "br-$config" 2>/dev/null >/dev/null && { + $DEBUG brctl addif "br-$config" "$iface" return 0 } || { - $DEBUG brctl addbr "$bridge_ifname" - $DEBUG brctl setfd "$bridge_ifname" 0 - $DEBUG brctl addif "$bridge_ifname" "$iface" - iface="$bridge_ifname" + $DEBUG brctl addbr "br-$config" + $DEBUG brctl setfd "br-$config" 0 + $DEBUG brctl addif "br-$config" "$iface" + iface="br-$config" } ;; esac |