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 /rc.d/net-auto-wireless | |
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 'rc.d/net-auto-wireless')
-rwxr-xr-x | rc.d/net-auto-wireless | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/rc.d/net-auto-wireless b/rc.d/net-auto-wireless index a03097b..79c43b0 100755 --- a/rc.d/net-auto-wireless +++ b/rc.d/net-auto-wireless @@ -10,7 +10,7 @@ if [[ ! -x /usr/sbin/wpa_actiond ]]; then exit 1 fi -if [ -z "${WIRELESS_INTERFACE}" ]; then +if [[ -z "${WIRELESS_INTERFACE}" ]]; then echo "No interface name set. Add to /etc/conf.d/netcfg a line" echo " WIRELESS_INTERFACE=\"your_interface\"" exit 1 @@ -31,8 +31,7 @@ case "$1" in done stat_busy "Starting netcfg auto-wireless mode for interface ${WIRELESS_INTERFACE}" - /usr/bin/netcfg-wpa_actiond "${WIRELESS_INTERFACE}" >/dev/null - if [ $? -eq 0 ]; then + if /usr/bin/netcfg-wpa_actiond "${WIRELESS_INTERFACE}" >/dev/null; then add_daemon net-auto-wireless stat_done else @@ -42,8 +41,7 @@ case "$1" in stop) if ! ck_daemon net-auto-wireless; then stat_busy "Stopping netcfg auto-wireless mode for interface ${WIRELESS_INTERFACE}" - /usr/bin/netcfg-wpa_actiond stop "${WIRELESS_INTERFACE}" >/dev/null - if [ $? -eq 0 ]; then + if /usr/bin/netcfg-wpa_actiond stop "${WIRELESS_INTERFACE}" >/dev/null; then rm_daemon net-auto-wireless stat_done else |