From eed3f590c9db7cd9cd4d5fb4722fc7257a278ea6 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Thu, 1 Mar 2012 01:33:12 +0100 Subject: 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 --- scripts/netcfg-wpa_actiond | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/netcfg-wpa_actiond') 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 -- cgit v1.2.3-24-g4f1b