From 16dda45374b5e3128825446fb705b94c3f6e3d09 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Tue, 29 Nov 2022 07:29:57 +0100 Subject: [PATCH] Fix tests to be compatible to jammy The test-payload section in the fanatic script is always spawning the latest LTS release as a test target. But due to system renaming systemd-resolve to resolvectl in v239 and later dropping it we now face: - bionic: systemd-resolved - focal: systemd-resolved + resolvectl - jammy: resolvectl To mess the least with the current function of the code we can just use the new command. Since the script always spawns the latest LTS we do not have to stay compatible with older releases. P.S. One could ague if there are better/other ways to check if networking is up, but this is meant to be a minimal change. --- fanatic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fanatic b/fanatic index cb46786..7509d2a 100755 --- a/fanatic +++ b/fanatic @@ -732,7 +732,7 @@ dns_lookup_forwarder() local dns2="" timeout=30 while [ $timeout -gt 0 ]; do - dns2=$(systemd-resolve --status $nic1| \ + dns2=$(resolvectl status $nic1| \ awk '/DNS Servers:/{print; exit}') if [ "$dns2" != "" ]; then break @@ -742,7 +742,7 @@ dns_lookup_forwarder() timeout=$(( timeout - 2 )) done if [ "$dns2" = "" ]; then - echo "$role: systemd-resolve failure!" + echo "$role: resolvectl failure!" return 1 fi dns2=$(echo "$dns2"|awk '{sub(/.*DNS Servers: */, ""); print}') -- 2.38.1