From ca0c33ae5b8a68806dd1c766e2f58ce24867f334 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 10 Jun 2022 12:32:43 +1000 Subject: Tweak dhclient arguments for readability A number of tests and examples use dhclient in both IPv4 and IPv6 modes. We use "dhclient -6" for IPv6, but usually just "dhclient" for IPv4. Add an explicit "-4" argument to make it more clear and explicit. In addition, when dhclient is run from within pasta it usually won't be "real" root, and so will not have access to write the default global pid file. This results in a mostly harmless but irritating error: Can't create /var/run/dhclient.pid: Permission denied We can avoid that by using the --no-pid flag to dhclient. Signed-off-by: David Gibson --- test/distro/ubuntu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/distro/ubuntu') diff --git a/test/distro/ubuntu b/test/distro/ubuntu index 3ce156d..c9a2b4d 100644 --- a/test/distro/ubuntu +++ b/test/distro/ubuntu @@ -150,7 +150,7 @@ host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ host ./qrap 5 qemu-system-ppc64 -m 1024 -M pseries -nographic -nodefaults -serial stdio -no-reboot -nographic -vga none -hda __IMG__ -net socket,fd=5 -net nic,model=virtio host PS1='$ ' -host dhclient +host dhclient -4 # Skip apt-get update here: some updates to xenial-updates around 2022-01-30 # broke dependencies for libc6 and gcc-5 -- note that powerpc is not officially # supported on this version @@ -185,7 +185,7 @@ host ./qrap 5 qemu-system-s390x -m 2048 -smp 2 -serial stdio -nodefaults -nograp host service systemd-resolved stop host export DEBIAN_FRONTEND=noninteractive host apt-get -y remove needrestart snapd -host dhclient +host dhclient -4 sleep 2 host apt-get update host apt-get -y install make gcc netcat-openbsd -- cgit v1.2.3