[package] base-files: fix error reporting for unsupported protocols on virtual interfaces
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 7 Jun 2011 23:25:43 +0000 (23:25 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 7 Jun 2011 23:25:43 +0000 (23:25 +0000)
SVN-Revision: 27132

package/base-files/Makefile
package/base-files/files/lib/network/config.sh
package/base-files/files/sbin/ifup

index 5e6e652716d780dc623a7d54e4edcefcfd36843b..2ad6bdd516048acb5f026c169b44555e3dc36964 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=71
+PKG_RELEASE:=72
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index c262282faa0d9095f2e663196f5169e641c73015..7e4a53d0a7f08bee7259cdaf986ed59e3c4a2d0a 100755 (executable)
@@ -325,7 +325,7 @@ setup_interface() {
        }
 
        # Interface settings
-       grep "$iface:" /proc/net/dev > /dev/null && {
+       grep -qE "^ *$iface:" /proc/net/dev && {
                local mtu macaddr txqueuelen
                config_get mtu "$config" mtu
                config_get macaddr "$config" macaddr
index 96f7bea3576d9f4dec98bb6b7e98beb99a825753..6acd2ed09978276636c6a1a27f27453d67b701b5 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 
 /sbin/ifdown "$@"
 
@@ -18,6 +18,6 @@ include /lib/network
 scan_interfaces
 
 config_get ifname "$1" device
-for dev in $ifname; do
+for dev in ${ifname:-$1}; do
        setup_interface "$dev" "$1"
 done