diff options
-rwxr-xr-x | lib/Vyatta/ConfigLoad.pm | 9 | ||||
-rwxr-xr-x | scripts/vyatta-load-config.pl | 12 |
2 files changed, 12 insertions, 9 deletions
diff --git a/lib/Vyatta/ConfigLoad.pm b/lib/Vyatta/ConfigLoad.pm index 47a27ce..033aec0 100755 --- a/lib/Vyatta/ConfigLoad.pm +++ b/lib/Vyatta/ConfigLoad.pm @@ -102,14 +102,7 @@ sub enumerate_branch { } if (defined($cur_node->{'disable'})) { - my $p = join("/",@cur_path[0..$#cur_path-1]); - my $leaf = "$ENV{VYATTA_TEMP_CONFIG_DIR}/$p/node.val"; - if (-e $leaf) { - push @disable_list, join(" ",@cur_path[0..$#cur_path-1]); - } - else { - push @disable_list, join(" ",@cur_path); - } + push @disable_list, join(" ",@cur_path); } if ($terminal) { diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl index 9284cba..b73216a 100755 --- a/scripts/vyatta-load-config.pl +++ b/scripts/vyatta-load-config.pl @@ -230,7 +230,17 @@ foreach (@activate_list) { } foreach (@deactivate_list) { - my $cmd = "$sbindir/vyatta-activate-config.pl deactivate $_"; + my @cp = split(" ",$_); + my $p = join("/",@cp[0..$#cp-1]); + my $leaf = "$ENV{VYATTA_TEMP_CONFIG_DIR}/$p/node.val"; + my $c = ""; + if (-e $leaf) { + $c = join(" ",@cp[0..$#cp-1]); + } + else { + $c = join(" ",@cp); + } + my $cmd = "$sbindir/vyatta-activate-config.pl deactivate $c"; system("$cmd 1>/dev/null"); #ignore error on complaint re: nested nodes } |