summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2014-08-05 13:57:14 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2014-08-05 13:57:14 +0200
commit810cdb650116037caf2eaa45b7f9d553b897b270 (patch)
treef1b2df40b42139e6b16c1099d3dd8ea7439043ed
parent1d490769d87875bbc03de1c1c7b198e4f9f42b91 (diff)
downloadnetctl-810cdb650116037caf2eaa45b7f9d553b897b270.tar.gz
netctl-810cdb650116037caf2eaa45b7f9d553b897b270.tar.xz
Code quality
-rw-r--r--docs/examples/bonding4
-rw-r--r--src/lib/dhcp/dhcpcd4
-rwxr-xr-xsrc/netctl-auto2
3 files changed, 4 insertions, 6 deletions
diff --git a/docs/examples/bonding b/docs/examples/bonding
index 090892d..3ad5de2 100644
--- a/docs/examples/bonding
+++ b/docs/examples/bonding
@@ -1,5 +1,5 @@
-Description='Bond Interface'
-Interface='bond0'
+Description="A bonded interface"
+Interface=bond0
Connection=bond
BindsToInterfaces=(eth0 eth2)
IP=static
diff --git a/src/lib/dhcp/dhcpcd b/src/lib/dhcp/dhcpcd
index 5dba10a..f0fe890 100644
--- a/src/lib/dhcp/dhcpcd
+++ b/src/lib/dhcp/dhcpcd
@@ -13,9 +13,7 @@ dhcpcd_start() {
fi
# If using own dns, tell dhcpcd to NOT replace resolv.conf
[[ $DNS ]] && options+=" -C resolv.conf"
- do_debug do_readable dhcpcd -$1 -q -t "${TimeoutDHCP:-30}" $options "$Interface"
- # The first array value of PIPESTATUS is the exit status of dhcpcd
- if (( PIPESTATUS != 0 )); then
+ if ! do_debug do_readable dhcpcd -$1 -q -t "${TimeoutDHCP:-30}" $options "$Interface"; then
report_error "DHCP IPv$1 lease attempt failed on interface '$Interface'"
return 1
fi
diff --git a/src/netctl-auto b/src/netctl-auto
index 507b1fc..d9fac3a 100755
--- a/src/netctl-auto
+++ b/src/netctl-auto
@@ -80,7 +80,7 @@ profile_enable_disable() {
local action="$1" profile="$2"
local id interfaces wpa_cmd
- if [ -n "$profile" ]; then
+ if [[ -n "$profile" ]]; then
read -r interfaces id < <(get_wpa_network_id "$profile") || return 1
else
interfaces=$(list_netctl_auto_interfaces)