aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnetwork8
1 files changed, 6 insertions, 2 deletions
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