diff options
-rwxr-xr-x | scripts/system/vyatta_update_resolv.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/system/vyatta_update_resolv.pl b/scripts/system/vyatta_update_resolv.pl index 3f0d539e..70127512 100755 --- a/scripts/system/vyatta_update_resolv.pl +++ b/scripts/system/vyatta_update_resolv.pl @@ -47,8 +47,15 @@ if ($dhclient_script == 1) { } if ($dhclient_script == 0 && @domains > 0 && $domain_name && length($domain_name) > 0) { - Vyatta::Config::outputError(["system domain-name","system domain-search domain"],"System configuration error. Both \'domain-name\' and \'domain-search\' are specified, but only one of these mutually exclusive parameters is allowed."); - exit(1); + my @loc; + if ($vc->returnOrigValues('domain-search domain') > 0) { + @loc = ["system","domain-name"]; + } + else { + @loc = ["system","domain-search","domain"]; + } + Vyatta::Config::outputError(@loc,"System configuration error. Both \'domain-name\' and \'domain-search\' are specified, but only one of these mutually exclusive parameters is allowed."); + exit(1); } my $doms = ''; |