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