If we use dhclient without creating a complete network configuration,
systemd-resolved will stop working after a while, and this sometimes
happens while we're still installing packages.
Disable it, together with systemd-networkd, while taking care of
removing the dhclient hook that prevents overriding /etc/resolv.conf.
While at it, it looks like removing snapd and needrestart actually
takes more time than keeping them: drop that line.
Signed-off-by: Stefano Brivio
---
test/distro/ubuntu | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/distro/ubuntu b/test/distro/ubuntu
index aa42c99..343fa03 100644
--- a/test/distro/ubuntu
+++ b/test/distro/ubuntu
@@ -191,7 +191,9 @@ test Ubuntu 22.04 (Jammy Jellyfish), s390x
host ./qrap 5 qemu-system-s390x -m 2048 -smp 2 -serial stdio -nodefaults -nographic __BASEPATH__/prepared-jammy-server-cloudimg-s390x.img -net socket,fd=5 -net nic,model=virtio -device virtio-rng-ccw -snapshot
host export DEBIAN_FRONTEND=noninteractive
-host apt-get -y remove needrestart snapd
+host service systemd-networkd stop
+host service systemd-resolved stop
+host rm /etc/dhcp/dhclient-enter-hooks.d/resolved-enter
host dhclient -4
dns_ready_wait
host apt-get update
--
2.35.1