From 6567750f6bf6d721432d57ef737b72070e697f64 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Fri, 8 Aug 2008 18:08:38 +0000 Subject: tighten regex pattern to get dhclient resolv files --- scripts/system/vyatta_update_resolv.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/vyatta_update_resolv.pl b/scripts/system/vyatta_update_resolv.pl index b35cae4a..cb6599ae 100755 --- a/scripts/system/vyatta_update_resolv.pl +++ b/scripts/system/vyatta_update_resolv.pl @@ -74,7 +74,7 @@ foreach my $domain (@domains) { # add domain names received from dhcp client to domain search in /etc/resolv.conf if domain-name not set in CLI if (!defined($domain_name)) { - my @dhcp_interfaces_resolv_files = `ls /etc/ | grep dhclient.new`; + my @dhcp_interfaces_resolv_files = `ls /etc/ | grep resolv.conf.dhclient-new`; if ($#dhcp_interfaces_resolv_files >= 0) { for my $each_file (@dhcp_interfaces_resolv_files) { chomp $each_file; @@ -107,7 +107,7 @@ if ($dhclient_script == 1) { # code below to add new name-servers received from dhcp client - my @dhcp_interfaces_resolv_files = `ls /etc/ | grep dhclient.new`; + my @dhcp_interfaces_resolv_files = `ls /etc/ | grep resolv.conf.dhclient-new`; if ($#dhcp_interfaces_resolv_files >= 0) { my $ns_count = 0; for my $each_file (@dhcp_interfaces_resolv_files) { -- cgit v1.2.3