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