diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-24 14:47:02 -0700 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-24 14:47:02 -0700 |
commit | acac4f47597320f55995bdaf692d6f2335a1d67e (patch) | |
tree | 5b64cf25a9ffca0a5dd369eb0a1e194c69cc7948 /network | |
parent | c3276e250c88173f36ddd50bc6a6c4feeb7409cb (diff) |
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 <aaronmgriffin@gmail.com>
Diffstat (limited to 'network')
-rwxr-xr-x | network | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |