1602871952
It's generally not a good idea to use the last phase if you can help it. Change-Id: If815aa0438c1eed3a71c0d94544c18520351753b
20 lines
719 B
Bash
Executable File
20 lines
719 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
|
|
|
|
# since we are running on centos only no need to gate this behind an if statement
|
|
systemctl enable NetworkManager.service
|
|
fi
|