Merge "Checking link status according to DIB_DHCP_TIMEOUT"
This commit is contained in:
commit
05a44e2181
@ -25,5 +25,5 @@ DIB_DHCP_TIMEOUT
|
||||
:Required: No
|
||||
:Default: 30
|
||||
:Description: Amount of time in seconds that the systemd service will
|
||||
wait to get an address.
|
||||
wait to get an address. Should be increased in networks such as Infiniband.
|
||||
:Example: DIB_DHCP_TIMEOUT=300
|
||||
|
@ -11,6 +11,7 @@ SCRIPTDIR=$(dirname $0)
|
||||
# this script is not needed on Gentoo.
|
||||
if [ "$DISTRO_NAME" != "gentoo" ]; then
|
||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh
|
||||
sed -i "s/DIB_DHCP_TIMEOUT/${DIB_DHCP_TIMEOUT:-30}/" /usr/local/sbin/dhcp-all-interfaces.sh
|
||||
fi
|
||||
|
||||
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
||||
|
@ -97,8 +97,8 @@ function inspect_interface() {
|
||||
echo "Device has generated MAC, skipping."
|
||||
else
|
||||
local has_link
|
||||
local tries
|
||||
for ((tries = 0; tries < 20; tries++)); do
|
||||
local tries=DIB_DHCP_TIMEOUT
|
||||
for ((; tries > 0; tries--)); do
|
||||
# Need to set the link up on each iteration
|
||||
ip link set dev $interface up &>/dev/null
|
||||
has_link=$(get_if_link $interface)
|
||||
|
Loading…
Reference in New Issue
Block a user