diskimage-builder/diskimage_builder/elements/simple-init/environment.d/15-simple-init-networkmanager
Ian Wienand cbe1a0fc6b simple-init: default to NetworkManager for CentOS and Fedora
NetworkManager with simple-init has proven to be stable in OpenStack
infra, switch to it by default for CentOS and Fedora.  For CentOS 8
and Fedora, add a check to make it the only option.  Thus only CenOS 7
remains optionally using the legacy scripts; this is likely not used
anywhere (infra is really the primary user, where NetworkManager is
already used); we can likely remove this variable (and hence path) in
a future cleanup.

In the setup, remove rhel7 element which was never really tested.
Reorganise the fallthrough to call out the default paths as doing
nothing.

Change-Id: Ic996956da4b85f7d95179b8df9881d5f52c091af
2019-10-07 10:46:57 +00:00

13 lines
481 B
Plaintext

if [[ ${DISTRO_NAME} =~ (centos|fedora) ]]; then
export DIB_SIMPLE_INIT_NETWORKMANAGER=${DIB_SIMPLE_INIT_NETWORKMANAGER:-1}
else
export DIB_SIMPLE_INIT_NETWORKMANAGER=${DIB_SIMPLE_INIT_NETWORKMANAGER:-0}
fi
if [[ ${DISTRO_NAME} == "centos" && $DIB_RELEASE -ge 8 ]] || [[ ${DISTRO_NAME} == "fedora" ]]; then
if [[ $DIB_SIMPLE_INIT_NETWORKMANAGER == 0 ]]; then
echo "simple-init only supports NetworkManager mode on Fedora and CentOS 8"
exit 1
fi
fi