diff options
Diffstat (limited to 'ifplugd/netcfg.action')
-rwxr-xr-x | ifplugd/netcfg.action | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ifplugd/netcfg.action b/ifplugd/netcfg.action index 34796df..bb02151 100755 --- a/ifplugd/netcfg.action +++ b/ifplugd/netcfg.action @@ -14,26 +14,26 @@ case "$2" in # it's difficult to tell if static succeeded # Also check profile is same iface and is right connection for profile in $(list_profiles); do ( - load_profile $profile - [[ $INTERFACE != $1 ]] && continue - [[ $CONNECTION != @(ethernet|ethernet-iproute) ]] && continue - if [[ $IP == "dhcp" ]]; then - netcfg $profile && exit 0 + load_profile "$profile" + [[ "$INTERFACE" != "$1" ]] && continue + [[ "$CONNECTION" != @(ethernet|ethernet-iproute) ]] && continue + if [[ "$IP" == "dhcp" ]]; then + netcfg "$profile" && exit 0 fi ) done for profile in $(list profiles}; do ( - load_profile $profile - [[ $INTERFACE != $1 ]] && continue - [[ $CONNECTION != @(ethernet|ethernet-iproute) ]] && continue - if [[ $IP == "static" ]]; then - netcfg $profile && exit 0 + load_profile "$profile" + [[ "$INTERFACE" != "$1" ]] && continue + [[ "$CONNECTION" != @(ethernet|ethernet-iproute) ]] && continue + if [[ "$IP" == "static" ]]; then + netcfg "$profile" && exit 0 fi ) done exit 1 ;; down) - if check_iface $1; then - netcfg -i $1 + if check_iface "$1"; then + netcfg -i "$1" fi ;; *) |