Commit 53be3d8e authored by Dietmar Maurer's avatar Dietmar Maurer

fix bug 234: use correct nameserver order

parent bed57d31
......@@ -1103,15 +1103,18 @@ sub update_ovz_config {
$veconf->{netif}->{value} = $newvalue;
}
if (defined($param->{'nameserver'})) {
if (defined($param->{'nameserver'})) {
# remove duplicates
my $nshash = {};
my $newvalue = '';
foreach my $ns (PVE::Tools::split_list($param->{'nameserver'})) {
if (!$nshash->{$ns}) {
push @$changes, '--nameserver', $ns;
$nshash->{$ns} = 1;
$newvalue .= $newvalue ? " $ns" : $ns;
}
}
$veconf->{'nameserver'}->{value} = join(' ', keys %$nshash);
$veconf->{'nameserver'}->{value} = $newvalue if $newvalue;
}
# foreach my $nv (@$changes) { print "CHANGE: $nv\n"; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment