summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2009-05-18 13:42:52 -0700
committerslioch <slioch@eng-140.vyatta.com>2009-05-18 13:42:52 -0700
commitc1996ea96f991e641af8f62efa63a133db0f9814 (patch)
tree076f903b8698412b60df450d37537e1e01356ee2 /lib
parent7a82196d79f6b755db514e002216340223e61de7 (diff)
downloadvyatta-cfg-c1996ea96f991e641af8f62efa63a133db0f9814.tar.gz
vyatta-cfg-c1996ea96f991e641af8f62efa63a133db0f9814.zip
now explicit root merge works up to first multinode with explicit path
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/ConfigLoad.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Vyatta/ConfigLoad.pm b/lib/Vyatta/ConfigLoad.pm
index a1c0b8f..09bd627 100755
--- a/lib/Vyatta/ConfigLoad.pm
+++ b/lib/Vyatta/ConfigLoad.pm
@@ -232,10 +232,13 @@ sub loadConfigHierarchy {
my $xcp = new XorpConfigParser();
$xcp->parse($load_cfg);
my $root;
+ my @root_path;
if (defined($root_node)) {
- my $tmp = [$root_node];
+ my $tmp = [split("/",$root_node)];
$root = $xcp->get_node($tmp);
- #root_path= --except last node and needs to be passed to enumerate_branch
+ my @tmp2 = split("/",$root_node);
+ @root_path = pop(@tmp2);
+ @root_path = @tmp2;
}
else {
$root = $xcp->get_node( () );
@@ -243,7 +246,7 @@ sub loadConfigHierarchy {
if (!defined($root)) {
return ();
}
- enumerate_branch($root, ( ));
+ enumerate_branch($root, @root_path);
return generateHierarchy(\@all_naked_nodes);
}