summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib_jump_deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/scripts/lib_jump_deploy.sh')
-rw-r--r--mcp/scripts/lib_jump_deploy.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh
index 937071001..d3ccd6e69 100644
--- a/mcp/scripts/lib_jump_deploy.sh
+++ b/mcp/scripts/lib_jump_deploy.sh
@@ -152,6 +152,24 @@ function __mount_image {
sudo mount -t proc proc "${OPNFV_MNT_DIR}/proc"
sudo mount -t sysfs sys "${OPNFV_MNT_DIR}/sys"
sudo mount -o bind /dev "${OPNFV_MNT_DIR}/dev"
+ if [[ "${MCP_OS:-}" =~ ubuntu1804 ]]; then
+ # Ubuntu Bionic (18.04) or newer defaults to using netplan.io, revert it
+ sudo mkdir -p "${OPNFV_MNT_DIR}/run/systemd/resolve"
+ sudo cp -f --remove-destination /etc/resolv.conf \
+ "${OPNFV_MNT_DIR}/run/systemd/resolve/stub-resolv.conf"
+ sudo chroot "${OPNFV_MNT_DIR}" systemctl stop \
+ systemd-networkd.socket systemd-networkd \
+ networkd-dispatcher systemd-networkd-wait-online systemd-resolved
+ sudo chroot "${OPNFV_MNT_DIR}" systemctl disable \
+ systemd-networkd.socket systemd-networkd \
+ networkd-dispatcher systemd-networkd-wait-online systemd-resolved
+ sudo chroot "${OPNFV_MNT_DIR}" systemctl mask \
+ systemd-networkd.socket systemd-networkd \
+ networkd-dispatcher systemd-networkd-wait-online systemd-resolved
+ sudo chroot "${OPNFV_MNT_DIR}" apt --assume-yes purge nplan netplan.io
+ echo "source /etc/network/interfaces.d/*" | \
+ sudo tee "${OPNFV_MNT_DIR}/etc/network/interfaces"
+ fi
sudo cp -f --remove-destination \
/etc/resolv.conf "${OPNFV_MNT_DIR}/etc/resolv.conf"
echo "GRUB_DISABLE_OS_PROBER=true" | \