File 0021-Added-DHCLIENT_WAIT_LINK-variable-instead-to-hardcod.patch of Package sysconfig.openSUSE_12.1_Update
From 90a977938744d4b471b28d2d56e80cda7a788afc Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.com>
Date: Wed, 26 Sep 2012 17:28:35 +0200
References: bnc#780644
Subject: [PATCH 03/11] Added DHCLIENT_WAIT_LINK variable instead to hardcode
Changed to use DHCLIENT_WAIT_AT_BOOT/2 sec.
---
config/sysconfig.dhcp-network | 21 ++++++++++++++++++---
scripts/ifup-dhcp | 4 +++-
2 Dateien geändert, 21 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
diff --git a/config/sysconfig.dhcp-network b/config/sysconfig.dhcp-network
index 17c9688..2e63fbb 100644
--- a/config/sysconfig.dhcp-network
+++ b/config/sysconfig.dhcp-network
@@ -258,11 +258,24 @@ DHCLIENT_RELEASE_BEFORE_QUIT="no"
#
DHCLIENT6_RELEASE_BEFORE_QUIT="no"
+## Type: integer
+## Default: ""
+#
+# Before ifup-dhcp is going to start dhcp clients, it will set up the link
+# when needed. Then it has to wait until the link is ready. This setting
+# allows to specify the time how long to wait. Default is half of the time
+# in the DHCLIENT_WAIT_AT_BOOT variable.
+#
+DHCLIENT_WAIT_LINK=""
+
## Type: integer
## Default: 0
#
-# Some interfaces need time to initialize. Add the latency time in seconds
-# so these can be handled properly. Should probably set per interface rather than here.
+# Some interfaces need time to initialize and/or do not report correct status.
+# Add the latency time in seconds so these can be handled properly. Should
+# probably set per interface rather than here.
+# This setting causes a sleep time before dhcp clients are started regardless
+# of the link status (wait time in DHCLIENT_WAIT_LINK).
#
DHCLIENT_SLEEP="0"
@@ -271,7 +284,9 @@ DHCLIENT_SLEEP="0"
#
# When the DHCP client is started at boot time, the boot process will stop
# until the interface is successfully configured, but at most for
-# DHCLIENT_WAIT_AT_BOOT seconds.
+# DHCLIENT_WAIT_AT_BOOT seconds. Do not set this variable higher than the
+# WAIT_FOR_INTERFACES variable -- it is adjusted to WAIT_FOR_INTERFACES/2
+# as default.
#
# Note: RFC 2131 specifies, that the dhcp client should wait a random time
# between one and ten seconds to desynchronize the use of DHCP at startup.
diff --git a/scripts/ifup-dhcp b/scripts/ifup-dhcp
index 3bbdf92..c122e42 100755
--- a/scripts/ifup-dhcp
+++ b/scripts/ifup-dhcp
@@ -689,7 +689,9 @@ case "$ACTION" in
${LLADDR:+address $LLADDR} $LINK_OPTIONS
# wait a bit or dhclient(6) may produce false send errors
- link_ready_wait "$INTERFACE" 3
+ # or dhcp4 may sent its first packets before link is ready,
+ # increase the resent time and all needs a while longer...
+ link_ready_wait "$INTERFACE" ${DHCLIENT_WAIT_LINK:-$((${DHCLIENT_WAIT_AT_BOOT:-15}/2))}
# (optionally) wait until a device is really configured
sleep ${DHCLIENT_SLEEP:-0}
--
1.7.10.4