diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2012-03-01 01:33:12 +0100 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-03-01 01:35:58 +0100 |
commit | eed3f590c9db7cd9cd4d5fb4722fc7257a278ea6 (patch) | |
tree | d34406a8af61dccbb9655b899da30d04ce61a623 /scripts/netcfg-wpa_actiond | |
parent | 8d1c5e8ec6b637015e84bbb154ece9065c59f1c5 (diff) | |
download | netctl-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-x | scripts/netcfg-wpa_actiond | 10 |
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 |