From a56c4454a3aa501ee3de12a1d2c5ee3d0cb050c7 Mon Sep 17 00:00:00 2001 From: Manuel Montecelo Date: Sat, 19 Jun 2021 15:01:11 +0200 Subject: [PATCH] TT#105151 Do the renaming eth*->neth* outside of the "if $NGCP_INSTALLER" block Jobs like daily-build-matrix-debian-boxes build plain Debian machines, not NGCP-based ones. At the moment we're generating the udev-rules for network renaming unconditionally, so we have to do it consistently, either both conditionally and not for "plain" systems, or both unconditionally, so network can be brought up by a correct /etc/network/interfaces after the devices are brought up with the new names. There is a good-ish argument for keeping using eth0, as it is more of a default, but we're already deviating from the default for several years and Debian stable releases by having these names and not ones like "ens18" or "enp4s0f2" which is the default in Debian nowadays, at least since buster. So it is probably better to keep it consistent with our other machines and use "neth*" naming for those too. Change-Id: I6b3b49a1769894580df768abb817ae5196e65963 --- templates/scripts/includes/deployment.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index 44231eb..c45a923 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -2225,11 +2225,7 @@ EOT echo "Copying /etc/network/interfaces ..." cp /etc/network/interfaces "${TARGET}/etc/network/" sed -i '/iface lo inet dhcp/d' "${TARGET}/etc/network/interfaces" - echo "Renaming eth*->neth* in /etc/network/interfaces ..." - sed -i '/eth[0-9]/ s|eth|neth|g' "${TARGET}/etc/network/interfaces" - echo "Content of resulting /etc/network/interfaces:" - tail -v -n +0 "${TARGET}/etc/network/interfaces" - echo "========" + # renaming eth*->neth* done below, to also do it for non-ngcp installations unset method netcardconf else die "Error during installation of ngcp. Find details at: ${TARGET}/var/log/ngcp-installer.log" @@ -2246,6 +2242,14 @@ EOT fi fi +# network interfaces need to be renamed eth*->neth* with mr9.5 / Debian +# bullseye, and not left with grml-bootstrap defaults +echo "Renaming eth*->neth* in /etc/network/interfaces ..." +sed -i '/eth[0-9]/ s|eth|neth|g' "${TARGET}/etc/network/interfaces" +echo "Content of resulting /etc/network/interfaces:" +tail -v -n +0 "${TARGET}/etc/network/interfaces" +echo "========" + if [[ -n "${MANAGEMENT_IP}" ]] && "${RETRIEVE_MGMT_CONFIG}" ; then echo "Retrieving public key from management node" cat > "${TARGET}/tmp/retrieve_authorized_keys.sh" << EOT