summaryrefslogtreecommitdiff
path: root/scripts/vyatta-load-config.pl
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-05-25 09:52:45 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-05-25 09:52:45 -0700
commit36ea15e7d9119a19f3541ca16a2b4f13efc8dac7 (patch)
tree87dba45a3f3669243b79e2e64c2f5c051ac703cd /scripts/vyatta-load-config.pl
parent308ac78af23dbac8d70a172ca5c6cc70c8cd0e31 (diff)
downloadvyatta-cfg-36ea15e7d9119a19f3541ca16a2b4f13efc8dac7.tar.gz
vyatta-cfg-36ea15e7d9119a19f3541ca16a2b4f13efc8dac7.zip
final fix for 5610. fixes loading where node in active config is deactivated and is active in loaded configuration.
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-rwxr-xr-xscripts/vyatta-load-config.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl
index 296dc0d..9284cba 100755
--- a/scripts/vyatta-load-config.pl
+++ b/scripts/vyatta-load-config.pl
@@ -191,6 +191,7 @@ if ( scalar( keys %cfg_hier ) == 0 ) {
my %cfg_diff = Vyatta::ConfigLoad::getConfigDiff( \%cfg_hier );
my @set_list = @{ $cfg_diff{'set'} };
my @deactivate_list = @{ $cfg_diff{'deactivate'} };
+my @activate_list = @{ $cfg_diff{'activate'} };
my @comment_list = @{ $cfg_diff{'comment'} };
if ($merge_mode eq 'false') {
@@ -219,8 +220,16 @@ foreach (@set_list) {
}
}
+
+
+
+foreach (@activate_list) {
+ my $cmd = "$sbindir/vyatta-activate-config.pl activate $_";
+ system("$cmd 1>/dev/null");
+ #ignore error on complaint re: nested nodes
+}
+
foreach (@deactivate_list) {
- #need to remove .disable nodes recursively in tree through activate command
my $cmd = "$sbindir/vyatta-activate-config.pl deactivate $_";
system("$cmd 1>/dev/null");
#ignore error on complaint re: nested nodes