summaryrefslogtreecommitdiffstats
path: root/ifplugd
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-11-29 02:47:12 +0100
committerJames Rayner <james@archlinux.org>2009-12-03 21:28:31 +0100
commit9e316d0a306f8ed2a9b46f76b04806e0a5b1760a (patch)
tree8c092b2d6a7392575c9aa10b1df79fbbeb4ca068 /ifplugd
parent7904a6b48590cbb1d0e37d7a8852da5ebacfaf99 (diff)
downloadnetctl-9e316d0a306f8ed2a9b46f76b04806e0a5b1760a.tar.gz
netctl-9e316d0a306f8ed2a9b46f76b04806e0a5b1760a.tar.xz
netcfg.action: add quotes
Quotes aren't needed inside [[ ]] because that construction doesn't do word expansion. But I think (partly from my own urging) this is the style used throughout the rest of the code. And we should have the quotes in lines like: netcfg "$profile". Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'ifplugd')
-rwxr-xr-xifplugd/netcfg.action24
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
;;
*)