summaryrefslogtreecommitdiff
path: root/net.Linux/netplugd.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-28 15:45:03 +0000
committerRoy Marples <roy@marples.name>2007-11-28 15:45:03 +0000
commitac9279cc0d5a00bc17908b2914941186020cd3ce (patch)
tree850a4fe19917113e75bfd2e79d00b58208468503 /net.Linux/netplugd.sh
parent444f23e2d158389b22d40537fc9b027d9f575229 (diff)
downloadopenrc-ac9279cc0d5a00bc17908b2914941186020cd3ce.tar.gz
openrc-ac9279cc0d5a00bc17908b2914941186020cd3ce.tar.bz2
openrc-ac9279cc0d5a00bc17908b2914941186020cd3ce.tar.xz
Massive whitespace cleanup
Diffstat (limited to 'net.Linux/netplugd.sh')
-rw-r--r--net.Linux/netplugd.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/net.Linux/netplugd.sh b/net.Linux/netplugd.sh
index 160c6a6..b1460b9 100644
--- a/net.Linux/netplugd.sh
+++ b/net.Linux/netplugd.sh
@@ -45,15 +45,15 @@ netplugd_pre_start() {
# We need a valid MAC address
# It's a basic test to ensure it's not a virtual interface
- if ! _get_mac_address >/dev/null 2>/dev/null ; then
+ if ! _get_mac_address >/dev/null 2>&1; then
vewarn "netplug only works on interfaces with a valid MAC address"
return 0
fi
# We don't work on bonded, bridges, tun/tap, vlan or wireless
- for f in bond bridge tuntap vlan wireless ; do
- if type "_is_${f}" >/dev/null 2>/dev/null ; then
- if _is_${f} ; then
+ for f in bond bridge tuntap vlan wireless; do
+ if type "_is_${f}" >/dev/null 2>&1; then
+ if _is_${f}; then
veinfo "netplug does not work with" "${f}"
return 0
fi
@@ -75,28 +75,28 @@ netplugd_pre_start() {
eval timeout=\$plug_timeout_${IFVAR}
[ -z "${timeout}" ] && timeout=-1
- if [ ${timeout} -eq 0 ] ; then
- ewarn "WARNING: infinite timeout set for" "${IFACE}" "to come up"
- elif [ ${timeout} -lt 0 ] ; then
+ if [ ${timeout} -eq 0 ]; then
+ ewarn "WARNING: infinite timeout set for ${IFACE} to come up"
+ elif [ ${timeout} -lt 0 ]; then
einfo "Backgrounding ..."
exit 1
fi
- veinfo "Waiting for" "${IFACE}" "to be marked as started"
+ veinfo "Waiting for ${IFACE} to be marked as started"
local i=0
- while true ; do
- if service_started "${SVCNAME}" ; then
+ while true; do
+ if service_started "${SVCNAME}"; then
_show_address
exit 0
fi
sleep 1
- [ ${timeout} -eq 0 ]] && continue
+ [ ${timeout} -eq 0 ] && continue
i=$((${i} + 1))
[ ${i} -ge ${timeout} ] && break
done
- eend 1 "Failed to configure" "${IFACE}" "in the background"
+ eend 1 "Failed to configure ${IFACE} in the background"
exit 1
}