mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-18 00:58:29 +00:00
apply upstream fixes
This commit is contained in:
parent
072fc78d73
commit
daea3a6985
@ -56,14 +56,12 @@ sub setup_tap_static {
|
||||
}
|
||||
|
||||
sub get_host_dns {
|
||||
# get DNS server addresses from the host
|
||||
my @forwards;
|
||||
open(FH, '<', "/etc/resolv.conf");
|
||||
while (<FH>) {
|
||||
if ($_ =~ m/^nameserver +(.+)/) {
|
||||
push @forwards, $1;
|
||||
}
|
||||
}
|
||||
# get DNS server addresses from the host. Assumes host uses
|
||||
# systemd-resolved and doesn't use IPv6, for now
|
||||
my $result = `/usr/bin/resolvectl status | grep Servers | tail -1 | cut -d: -f2-`;
|
||||
# FIXME this is gonna break when we have IPv6 DNS servers on the
|
||||
# worker hosts
|
||||
my @forwards = split(' ', $result);
|
||||
return @forwards;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user