From 9ff4fc00a4e92b23fe42e36f4cf3d1758ee1cb24 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Fri, 11 Sep 2009 18:02:51 -0700 Subject: Fix Bug 4919 "service dns" branch of configuration file missing ... * modify code to comply with Jenner change in is_dhcp_enabled() --- scripts/dns-forwarding/vyatta-dns-forwarding.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index d8552bd4..0caf8371 100644 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -167,10 +167,8 @@ sub check_dhcp_interface { my $interface = shift; - if (!Vyatta::Misc::is_dhcp_enabled($interface)) { - print "DNS forwarding error: $interface is not using DHCP to get an IP address\n"; - return 0; - } + die "DNS forwarding error: $interface is not using DHCP to get an IP address\n" + unless Vyatta::Misc::is_dhcp_enabled($interface); if (-e "/var/run/vyatta/dhclient/dhclient_release_$interface") { # dhcp released for the interface -- cgit v1.2.3