summaryrefslogtreecommitdiffstats
path: root/scripts/netcfg-wpa_actiond
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-03-01 01:33:12 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2012-03-01 01:35:58 +0100
commiteed3f590c9db7cd9cd4d5fb4722fc7257a278ea6 (patch)
treed34406a8af61dccbb9655b899da30d04ce61a623 /scripts/netcfg-wpa_actiond
parent8d1c5e8ec6b637015e84bbb154ece9065c59f1c5 (diff)
downloadnetctl-eed3f590c9db7cd9cd4d5fb4722fc7257a278ea6.tar.gz
netctl-eed3f590c9db7cd9cd4d5fb4722fc7257a278ea6.tar.xz
Code quality upgrade
This is what you get when Dave Reisner points you at some bash anti-patterns. Also in this commit: - updated documentation - bugfix revision of the IPv6 SLAAC address/route bug
Diffstat (limited to 'scripts/netcfg-wpa_actiond')
-rwxr-xr-xscripts/netcfg-wpa_actiond10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/netcfg-wpa_actiond b/scripts/netcfg-wpa_actiond
index 2e402df..c8a2867 100755
--- a/scripts/netcfg-wpa_actiond
+++ b/scripts/netcfg-wpa_actiond
@@ -43,11 +43,11 @@ fi
[[ -f "$IFACE_DIR/$interface" ]] && source "$IFACE_DIR/$interface"
if [[ -f "$CONN_DIR/interfaces/$interface" ]]; then
- netcfg -i $interface
+ netcfg -i "$interface"
fi
if [[ -n "$RFKILL" ]]; then # Enable radio if necessary
- enable_rf $interface $RFKILL $RFKILL_NAME || exit $?
+ enable_rf "$interface" "$RFKILL" "$RFKILL_NAME" || exit $?
fi
WPA_CONF="$(make_wpa_config_file $interface)"
@@ -65,9 +65,9 @@ fi | while read profile; do
[[ $INTERFACE != $interface ]] && exit 1
# Exclude wpa-config, the wpa_conf is 'complete' and doesn't fit in this scheme
[[ -z "$SECURITY" ]] && SECURITY="none"
- [[ $SECURITY == "wpa-config" ]] && exit 1
-
- echo -e "network={ \n$(make_wpa_config) \nid_str=\"$profile\" \n}" >> $WPA_CONF
+ [[ $SECURITY == "wpa-config" ]] && exit 1
+
+ printf "%s\n" "network={" "$(make_wpa_config)" "id_str=\"$profile\"" "}" >> $WPA_CONF
)
done