summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-07-30 16:13:02 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-07-30 16:13:02 -0700
commita1858981fbe2f4bf8fa164b56d66be08c2f6a026 (patch)
treeb5d934bb31fc1afbc0d3c78c8ba606642afdc5f5 /lib
parentdc4bd2c05375cece9d1c1281cbebbef40a09c4e4 (diff)
downloadvyatta-cfg-a1858981fbe2f4bf8fa164b56d66be08c2f6a026.tar.gz
vyatta-cfg-a1858981fbe2f4bf8fa164b56d66be08c2f6a026.zip
new API changes
Diffstat (limited to 'lib')
-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" );
}