summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2006-02-23 13:39:22 +0000
committerChristian Heim <phreak@gentoo.org>2006-02-23 13:39:22 +0000
commita2c749b6b0e3e3fc03edf067486d950d494a9ff3 (patch)
tree0ae717a18dc285e9aee74b77d583ac1fe21eb99d /net-scripts
parentMerging r1909 (diff)
downloadbaselayout-vserver-a2c749b6b0e3e3fc03edf067486d950d494a9ff3.tar.gz
baselayout-vserver-a2c749b6b0e3e3fc03edf067486d950d494a9ff3.tar.bz2
baselayout-vserver-a2c749b6b0e3e3fc03edf067486d950d494a9ff3.zip
Merging baselayout r1924
svn path=/baselayout-vserver/trunk/; revision=252
Diffstat (limited to 'net-scripts')
-rw-r--r--net-scripts/conf.d/net.example2
-rw-r--r--net-scripts/net.modules.d/helpers.d/functions2
-rw-r--r--net-scripts/net.modules.d/ifplugd5
-rw-r--r--net-scripts/net.modules.d/netplugd5
-rw-r--r--net-scripts/net.modules.d/wpa_supplicant4
5 files changed, 11 insertions, 7 deletions
diff --git a/net-scripts/conf.d/net.example b/net-scripts/conf.d/net.example
index baec820..a28bf43 100644
--- a/net-scripts/conf.d/net.example
+++ b/net-scripts/conf.d/net.example
@@ -45,7 +45,7 @@
# In other words, you probably should DO NOTHING HERE...
# Prefer ifconfig over iproute2
-#modules=( "iproute2" )
+#modules=( "ifconfig" )
# You can also specify other modules for an interface
# In this case we prefer udhcpc over dhcpcd
diff --git a/net-scripts/net.modules.d/helpers.d/functions b/net-scripts/net.modules.d/helpers.d/functions
index 058ba95..52f3da1 100644
--- a/net-scripts/net.modules.d/helpers.d/functions
+++ b/net-scripts/net.modules.d/helpers.d/functions
@@ -74,7 +74,7 @@ apply_state() {
local file
for file in ${files} ; do
# Skip .sv files
- [[ ${file} == *".sv" ]] && contine
+ [[ ${file} == *".sv" ]] && continue
local link=$( readlink "/etc/${file}" 2>/dev/null )
if [[ ${link} != "${netdir}/${file}" ]]; then
[[ -e "/etc/${file}" ]] && rm -f "/etc/${file}"
diff --git a/net-scripts/net.modules.d/ifplugd b/net-scripts/net.modules.d/ifplugd
index 818969e..edeefe9 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 i 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
@@ -104,7 +104,7 @@ ifplugd_pre_start() {
veinfo "Waiting for ${iface} to be marked as started"
- i=0
+ local i=0
while true ; do
if service_started "net.${iface}"; then
local addr=$( interface_get_address "${iface}" )
@@ -112,6 +112,7 @@ ifplugd_pre_start() {
exit 0
fi
sleep 1
+ [[ ${timeout} == "0" ]] && continue
(( i++ ))
[[ ${i} == "${timeout}" || ${i} -gt "${timeout}" ]] && break
done
diff --git a/net-scripts/net.modules.d/netplugd b/net-scripts/net.modules.d/netplugd
index a079c3f..109e569 100644
--- a/net-scripts/net.modules.d/netplugd
+++ b/net-scripts/net.modules.d/netplugd
@@ -29,7 +29,7 @@ netplugd_check_installed() {
#
# Start netplug on an interface
netplugd_pre_start() {
- local iface="$1" timeout i
+ local iface="$1" timeout
local pidfile="/var/run/netplugd.${iface}.pid"
# We don't start netplug if we're being called from the background
@@ -82,7 +82,7 @@ netplugd_pre_start() {
veinfo "Waiting for ${iface} to be marked as started"
- i=0
+ local i=0
while true ; do
if service_started "net.${iface}"; then
local addr=$( interface_get_address "${iface}" )
@@ -90,6 +90,7 @@ netplugd_pre_start() {
exit 0
fi
sleep 1
+ [[ ${timeout} == "0" ]] && continue
(( i++ ))
[[ ${i} == "${timeout}" || ${i} -gt "${timeout}" ]] && break
done
diff --git a/net-scripts/net.modules.d/wpa_supplicant b/net-scripts/net.modules.d/wpa_supplicant
index 77fc29c..c695a27 100644
--- a/net-scripts/net.modules.d/wpa_supplicant
+++ b/net-scripts/net.modules.d/wpa_supplicant
@@ -138,7 +138,7 @@ wpa_supplicant_kill() {
# Returns 0 if wpa_supplicant associates and authenticates to an AP
# otherwise, 1
wpa_supplicant_associate() {
- local iface="$1" ifvar="$( bash_variable "$1" )" timeout i
+ local iface="$1" ifvar="$( bash_variable "$1" )" timeout
timeout="associate_timeout_${ifvar}"
[[ -z ${!timeout} ]] && timeout="wpa_timeout_${ifvar}"
timeout="${!timeout:--1}"
@@ -150,6 +150,7 @@ wpa_supplicant_associate() {
exit 0
fi
+ local i=0
while true ; do
if [[ -n ${actfile} ]] ; then
service_started "net.${iface}" && return 0
@@ -161,6 +162,7 @@ wpa_supplicant_associate() {
wpa_supplicant_associated "${iface}" && return 0
fi
sleep 1
+ [[ ${timeout} == "0" ]] && continue
(( i++ ))
[[ ${i} == "${timeout}" || ${i} -gt "${timeout}" ]] && break
done