diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-10 02:43:36 +0000 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-10 02:43:36 +0000 |
commit | 0ee064893b21c8eccdabe6eec5877831a6b79f02 (patch) | |
tree | 7a076926e65abd9507be1207bb8f16cd32a5431e /scripts/system | |
parent | 03399ce3a9127d78c535c4a6b7e1d8563df3888f (diff) | |
download | vyatta-cfg-system-0ee064893b21c8eccdabe6eec5877831a6b79f02.tar.gz vyatta-cfg-system-0ee064893b21c8eccdabe6eec5877831a6b79f02.zip |
- servers being used for dns forwarding written to dnsmasq.conf with more info in comments
- tighten check for updating resolv.conf for domain-names received from dhcp-server
Diffstat (limited to 'scripts/system')
-rwxr-xr-x | scripts/system/vyatta_update_resolv.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/system/vyatta_update_resolv.pl b/scripts/system/vyatta_update_resolv.pl index 054e8ee9..8f0e9ead 100755 --- a/scripts/system/vyatta_update_resolv.pl +++ b/scripts/system/vyatta_update_resolv.pl @@ -78,10 +78,10 @@ if (!defined($domain_name)) { if ($#dhcp_interfaces_resolv_files >= 0) { for my $each_file (@dhcp_interfaces_resolv_files) { chomp $each_file; - my $find_search = `grep search /etc/$each_file 2> /dev/null | wc -l`; + my $find_search = `grep "^search" /etc/$each_file 2> /dev/null | wc -l`; if ($find_search == 1) { - my $search_string = `grep search /etc/$each_file`; - my @dhcp_domains = split(/ /, $search_string, 2); + my $search_string = `grep "^search" /etc/$each_file`; + my @dhcp_domains = split(/\s+/, $search_string, 2); my $dhcp_domain = $dhcp_domains[1]; chomp $dhcp_domain; $doms .= ' ' . $dhcp_domain; |