summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-scripts/net.modules.d/ifplugd')
-rw-r--r--net-scripts/net.modules.d/ifplugd20
1 files changed, 10 insertions, 10 deletions
diff --git a/net-scripts/net.modules.d/ifplugd b/net-scripts/net.modules.d/ifplugd
index edeefe9..13d4e89 100644
--- a/net-scripts/net.modules.d/ifplugd
+++ b/net-scripts/net.modules.d/ifplugd
@@ -29,7 +29,7 @@ ifplugd_check_installed() {
#
# Start ifplugd on an interface
ifplugd_pre_start() {
- local iface="$1" ifvar=$( bash_variable "$1" ) timeout opts
+ local iface="$1" ifvar="$(bash_variable "$1")" timeout opts
local pidfile="/var/run/ifplugd.${iface}.pid"
# We don't start ifplugd if we're being called from the background
@@ -38,15 +38,15 @@ ifplugd_pre_start() {
interface_exists "${iface}" || return 0
# ifplugd could have been started by the old init script
- if [[ -e ${pidfile} ]]; then
+ if [[ -e ${pidfile} ]] ; then
vewarn "ifplugd is already running on ${iface}"
return 0
fi
# We need a valid MAC address
# It's a basic test to ensure it's not a virtual interface
- local mac=$(interface_get_mac_address "${iface}")
- if [[ -z ${mac} ]]; then
+ local mac="$(interface_get_mac_address "${iface}")"
+ if [[ -z ${mac} ]] ; then
vewarn "ifplugd only works on interfaces with a valid MAC address"
return 0
fi
@@ -68,9 +68,9 @@ ifplugd_pre_start() {
# Although ifplugd can, we prefer wpa_supplicant, unless explicitly told
# so via our options
if [[ " ${!opts} " != *" -m wlan "* \
- && " ${!opts} " != *" --api-mode=wlan "* ]]; then
+ && " ${!opts} " != *" --api-mode=wlan "* ]] ; then
if is_function wireless_exists ; then
- if wireless_exists "${iface}"; then
+ if wireless_exists "${iface}" ; then
veinfo "ifplugd does not work on wireless interfaces"
return 0
fi
@@ -95,9 +95,9 @@ ifplugd_pre_start() {
timeout="timeout_${ifvar}"
timeout="${!timeout:--1}"
- if [[ ${timeout} == "0" ]]; then
+ if [[ ${timeout} == "0" ]] ; then
ewarn "WARNING: infinite timeout set for ${iface} to come up"
- elif [[ ${timeout} -lt 0 ]]; then
+ elif [[ ${timeout} -lt 0 ]] ; then
einfo "Backgrounding ..."
exit 0
fi
@@ -106,8 +106,8 @@ ifplugd_pre_start() {
local i=0
while true ; do
- if service_started "net.${iface}"; then
- local addr=$( interface_get_address "${iface}" )
+ if service_started "net.${iface}" ; then
+ local addr="$(interface_get_address "${iface}")"
einfo "${iface} configured with address ${addr}"
exit 0
fi