summaryrefslogtreecommitdiffstats
path: root/src/connections/wireless
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 /src/connections/wireless
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 'src/connections/wireless')
-rw-r--r--src/connections/wireless4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index b19afde..f08ba43 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -27,7 +27,7 @@ wireless_up() {
# Start wpa_supplicant
WPA_CTRL_PATH=/run/wpa_supplicant
- if [ "$SECURITY" = "wpa-config" ]; then
+ if [[ "$SECURITY" = "wpa-config" ]]; then
WPA_CONF="${WPA_CONF:-/etc/wpa_supplicant.conf}"
# Use defined control path (FS#24949)
if grep "^ *ctrl_interface=" "$WPA_CONF" &>/dev/null; then
@@ -74,7 +74,7 @@ wireless_up() {
wpa-config)
;;
none|wep|wpa|wpa-configsection)
- echo -e "network={ \n$(make_wpa_config) \n}" >> "$WPA_CONF"
+ printf "%s\n" "network={" "$(make_wpa_config)" "}" >> "$WPA_CONF"
report_debug wireless_up "Configuration generated at $WPA_CONF"
;;
*)