From: John Crispin Date: Wed, 20 Aug 2008 11:17:40 +0000 (+0000) Subject: adds the option to have no proto for a interface, usefull if the uci states need... X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=4ffc474920194c878da5013c9d9a752709d46bdb;hp=7a875ba00ee836c0dc93666843e32f4bba127e64 adds the option to have no proto for a interface, usefull if the uci states need to be set, but interface bring up is handled somewhere else SVN-Revision: 12343 --- diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index 13e1980d9c..52e50b17ec 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -142,6 +142,10 @@ set_interface_ifname() { uci_set_state network "$config" device "$device" } +setup_interface_none() { + env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=none /sbin/hotplug-call "iface" & +} + setup_interface_static() { local iface="$1" local config="$2" @@ -259,6 +263,9 @@ setup_interface() { lock -u "/var/lock/dhcp-$iface" fi ;; + none) + setup_interface_none "$iface" "$config" + ;; *) if ( eval "type setup_interface_$proto" ) >/dev/null 2>/dev/null; then eval "setup_interface_$proto '$iface' '$config' '$proto'"