diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-09-17 19:27:17 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-09-17 19:27:17 -0700 |
commit | bab23d7cb8291192c74519f7cca2ee0044992723 (patch) | |
tree | c093f66681fff469808c86cf4186ad7d664ac3f8 /scripts/dns-forwarding | |
parent | 3d4b0dcf7e73f6a245c6c2b0a84a9fadad2ccaaf (diff) | |
download | vyatta-cfg-system-bab23d7cb8291192c74519f7cca2ee0044992723.tar.gz vyatta-cfg-system-bab23d7cb8291192c74519f7cca2ee0044992723.zip |
Fix Bug 3607 Error setting DNS forwarding to use DHCP
Diffstat (limited to 'scripts/dns-forwarding')
-rw-r--r-- | scripts/dns-forwarding/vyatta-dns-forwarding.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index 4a011b6a..38f5ee67 100644 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -119,7 +119,7 @@ sub dnsforwarding_get_values { if (@use_dhcp_nameservers != 0) { $use_dnsmasq_conf = 1; foreach my $interface (@use_dhcp_nameservers) { - my $dhcp_nameserver_count=`grep nameserver /etc/resolv.conf.dhclient-new-$interface | wc -l`; + my $dhcp_nameserver_count=`grep nameserver /etc/resolv.conf.dhclient-new-$interface 2>/dev/null | wc -l`; if ($dhcp_nameserver_count > 0) { my @dhcp_nameservers = `grep nameserver /etc/resolv.conf.dhclient-new-$interface`; for my $each_nameserver (@dhcp_nameservers) { @@ -149,7 +149,7 @@ sub dnsforwarding_write_file { sub check_nameserver { - my $cmd = `grep nameserver /etc/resolv.conf|wc -l`; + my $cmd = `grep nameserver /etc/resolv.conf 2>/dev/null | wc -l`; return $cmd; } |