Skip to content

Commit

Permalink
Fix multi-nameserver insert bug
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Jan 6, 2020
1 parent 36e917f commit c0d1116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Virtualmin/Config/Plugin/Net.pm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sub actions {
# XXX This shouldn't be necessary. There's some kind of bug in net::
my $resolvconf = '/etc/resolv.conf';
my $rlref = read_file_lines($resolvconf);
if (indexof('nameserver 127.0.0.1') < 0) {
if (indexof('nameserver 127.0.0.1'), @{$rlref} < 0) {
$log->info("Adding name server 127.0.0.1 to resolv.conf.");
unshift(@{$rlref}, 'nameserver 127.0.0.1');
unshift(@{$rlref}, '# Added by Virtualmin.');
Expand Down

0 comments on commit c0d1116

Please sign in to comment.