summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-20 09:02:17 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-20 09:02:17 -0700
commita06df028b102d595e09b784920cd18c03f5bda7c (patch)
tree95d56e21bc3359ea58e627fcacdedd6006e00658 /lib
parent3935d8058ff6b7158e8f4e8a407cbabe63f25ee4 (diff)
parent8e3b81d1a13f35d4b419fe9af6da2e0b7fa64a64 (diff)
downloadvyatta-cfg-a06df028b102d595e09b784920cd18c03f5bda7c.tar.gz
vyatta-cfg-a06df028b102d595e09b784920cd18c03f5bda7c.zip
Merge branch 'jenner' of suva.vyatta.com:/git/vyatta-cfg into jenner
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);
}