Matthew Thode e34ad321f7
Enable support for hardware that brings the network up slowly
Add the slow-network element which defaults the timeout of network
bring-up to 60 seconds set by the NETWORK_TIMEOUT environment variable.

Syncs the ops repository to a known location so that we can use the
element when building images.

Rename the register-images script to register-nodes as that what it
actually does.

Change-Id: I403667f7bf6c69e255a4f5639ee4a8e0e8af18e3
2017-11-16 14:00:14 -06:00

17 lines
588 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# If the file /etc/sysconfig/network exists, set some options to make dhcp happy happy happy
if [ -e "/etc/sysconfig/network" ] ; then
# Give some time for the link to come up before configuring via dhcp
grep -v -q '^LINKDELAY' /etc/sysconfig/network && echo "LINKDELAY=${NETWORK_TIMEOUT}" >> /etc/sysconfig/network
# Persistently try to gain a dhcp address
grep -v -q '^PERSISTENT_DHCLIENT' /etc/sysconfig/network && echo 'PERSISTENT_DHCLIENT=yes' >> /etc/sysconfig/network
fi