summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-03-16 12:18:14 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-03-16 12:18:14 -0700
commitbb368b089e72e89777ef18d0fcb2d61ae390c9a9 (patch)
tree28e48026d001a0865e11ff55300ea59b8e604121
parent05f0ba8e5ba9282973bb5bc207f9f854c1ffa4a5 (diff)
downloadvyatta-cfg-bb368b089e72e89777ef18d0fcb2d61ae390c9a9.tar.gz
vyatta-cfg-bb368b089e72e89777ef18d0fcb2d61ae390c9a9.zip
use template to determine leaf nodes
-rwxr-xr-xlib/Vyatta/ConfigLoad.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Vyatta/ConfigLoad.pm b/lib/Vyatta/ConfigLoad.pm
index 44c1089..627b361 100755
--- a/lib/Vyatta/ConfigLoad.pm
+++ b/lib/Vyatta/ConfigLoad.pm
@@ -315,7 +315,8 @@ sub findSetNodes {
$active_cfg->setLevel(join ' ', @active_path);
my @active_nodes = $active_cfg->listOrigNodes();
my %active_hash = map { $_ => 1 } @active_nodes;
- if (defined($active_hash{'node.val'})) {
+ my $nref = $active_cfg->parseTmplAll(join ' ', @active_path);
+ if (defined($nref->{type}) and !defined($nref->{tag})) {
# we are at a leaf node.
findSetValues($new_ref, \@active_path);
return;