diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-07-30 16:13:02 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-07-30 16:13:02 -0700 |
commit | a1858981fbe2f4bf8fa164b56d66be08c2f6a026 (patch) | |
tree | b5d934bb31fc1afbc0d3c78c8ba606642afdc5f5 /lib/Vyatta/Misc.pm | |
parent | dc4bd2c05375cece9d1c1281cbebbef40a09c4e4 (diff) | |
download | vyatta-cfg-a1858981fbe2f4bf8fa164b56d66be08c2f6a026.tar.gz vyatta-cfg-a1858981fbe2f4bf8fa164b56d66be08c2f6a026.zip |
new API changes
Diffstat (limited to 'lib/Vyatta/Misc.pm')
-rwxr-xr-x | lib/Vyatta/Misc.pm | 6 |
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" ); } |