summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/Vyatta/Misc.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm
index 44c0459..5373f7f 100755
--- a/lib/Vyatta/Misc.pm
+++ b/lib/Vyatta/Misc.pm
@@ -54,11 +54,11 @@ sub is_dhcp_enabled {
return unless $intf;
my $config = new Vyatta::Config;
- $config->{_active_dir_base} = "/opt/vyatta/config/active/"
- if ($outside_cli);
$config->setLevel( $intf->path() );
- foreach my $addr ( $config->returnOrigPlusComValues('address') ) {
+ # the "effective" observers can be used both inside and outside
+ # config sessions.
+ foreach my $addr ( $config->returnEffectiveValues('address') ) {
return 1 if ( $addr && $addr eq "dhcp" );
}