functions: let `cloud-init clean` inform about NM

ui-by-default-wip
Dan Bungert 2 years ago
parent eb0530b7a7
commit ef834c2e7d

@ -999,6 +999,17 @@ system_info:
renderers: ['network-manager']
activators: ['network-manager']
EOF
# Allow cloud-init clean to inform of strict network-manager config
mkdir -p chroot/etc/cloud/clean.d
cat <<EOF > chroot/etc/cloud/clean.d/99-installer-use-networkmanager
# Inform clone image creators about strict network-manager cfg for cloud-init
if [ -f /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg ]; then
echo "WARNING: cloud-init network config is limited to using network-manager."
echo "If this is undesirable: rm /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg"
fi
EOF
chmod +x chroot/etc/cloud/clean.d/99-installer-use-networkmanager
else
echo "==== NetworkManager not installed ===="
fi

Loading…
Cancel
Save