summaryrefslogtreecommitdiff
path: root/scripts/vyatta-load-config.pl
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-06-09 17:43:41 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-06-09 17:43:41 -0700
commite28eb1f16c05f71f91fa56ae7120cc95b104910a (patch)
tree9f3f69134b5dda3499f5a76143e1231b31a79b4f /scripts/vyatta-load-config.pl
parent8a5d10199a35fe7e796c3d7424bc8f882e6aba24 (diff)
downloadvyatta-cfg-e28eb1f16c05f71f91fa56ae7120cc95b104910a.tar.gz
vyatta-cfg-e28eb1f16c05f71f91fa56ae7120cc95b104910a.zip
better location for previous fix to bug 5676
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-rwxr-xr-xscripts/vyatta-load-config.pl12
1 files changed, 11 insertions, 1 deletions
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
}