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
mr10.0
Manuel Montecelo 5 years ago
parent eaecf474c2
commit a56c4454a3

@ -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

Loading…
Cancel
Save