From acac4f47597320f55995bdaf692d6f2335a1d67e Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 24 Sep 2009 14:47:02 -0700 Subject: network: Use real interface name for ifconfig up Using the variable name doesn't work in cases like this: my_interface_foo="eth0 blah blah" INTERFACES=(my_interface_foo) It produces errors like so: my_interface_foo no such device Fixes FS#16114 Signed-off-by: Aaron Griffin --- network | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'network') diff --git a/network b/network index 35982b9..de144a2 100755 --- a/network +++ b/network @@ -19,11 +19,15 @@ ifup() return 1 fi - /sbin/ifconfig $1 up + eval ifcfg="\$${1}" + + # Get the name of the interface from the first token in the string + ifname=${ifcfg%% *} + + /sbin/ifconfig $ifname up wi_up $1 || return 1 - eval ifcfg="\$${1}" if [ "$ifcfg" = "dhcp" ]; then # remove the .pid file if it exists /bin/rm -f /var/run/dhcpcd-${1}.pid >/dev/null 2>&1 -- cgit v1.2.3