diskimage-builder/diskimage_builder/elements/centos-minimal/environment.d/10-centos-distro-name.bash
Ian Wienand 314b11b6dd Fix networking for CentOS 8
By default network-scripts package isn't installed, so the directories
for these files don't exist either.  Skip by default for Centos 8.

Change-Id: I194ec3735e17f27e586386541dc51f775b01e510
2019-10-07 10:47:09 +00:00

12 lines
482 B
Bash

export DISTRO_NAME=centos
export DIB_RELEASE=${DIB_RELEASE:-7}
# by default, enable DHCP configuration of eth0 & eth1 in network
# scripts for centos 7. See yum-minimal for full details. CentOS 8
# does not come with network-scripts by default so avoid this there.
if [[ ${DIB_RELEASE} -le 7 ]]; then
export DIB_YUM_MINIMAL_CREATE_INTERFACES=${DIB_YUM_MINIMAL_CREATE_INTERFACES:-1}
else
export DIB_YUM_MINIMAL_CREATE_INTERFACES=${DIB_YUM_MINIMAL_CREATE_INTERFACES:-0}
fi