From 743745339502da513cce7acbc9b67fbce4378091 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 5 Oct 2009 14:43:35 -0700 Subject: network: support early 'up' for dhcp interfaces Previous commit acac4f47597320f55995bdaf692d6f2335a1d67e attempted to parse the name of the interface from the config line, but neglected to check for "dhcp" config lines, in which case the interface is the name Signed-off-by: Aaron Griffin --- network | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/network b/network index de144a2..d23b3a9 100755 --- a/network +++ b/network @@ -22,7 +22,12 @@ ifup() eval ifcfg="\$${1}" # Get the name of the interface from the first token in the string - ifname=${ifcfg%% *} + + if [ "$ifcfg" = "dhcp" ]; then + ifname="$1" + else + ifname=${ifcfg%% *} + fi /sbin/ifconfig $ifname up -- cgit v1.2.3