aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-06-07 23:25:43 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-06-07 23:25:43 +0000
commitd399f3a153afee77b8c2e9dddce160dce2fe6c09 (patch)
treef43af0ae16df039d96179914240317bae50a5919 /package/base-files/files
parent0fcd03962b37285083d609cdbc8a6ece6e308010 (diff)
downloadupstream-d399f3a153afee77b8c2e9dddce160dce2fe6c09.tar.gz
upstream-d399f3a153afee77b8c2e9dddce160dce2fe6c09.tar.bz2
upstream-d399f3a153afee77b8c2e9dddce160dce2fe6c09.zip
[package] base-files: fix error reporting for unsupported protocols on virtual interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27132 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh2
-rwxr-xr-xpackage/base-files/files/sbin/ifup4
2 files changed, 3 insertions, 3 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index c262282faa..7e4a53d0a7 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -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
diff --git a/package/base-files/files/sbin/ifup b/package/base-files/files/sbin/ifup
index 96f7bea357..6acd2ed099 100755
--- a/package/base-files/files/sbin/ifup
+++ b/package/base-files/files/sbin/ifup
@@ -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