From 36ea15e7d9119a19f3541ca16a2b4f13efc8dac7 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Tue, 25 May 2010 09:52:45 -0700 Subject: final fix for 5610. fixes loading where node in active config is deactivated and is active in loaded configuration. --- scripts/vyatta-load-config.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'scripts') 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 -- cgit v1.2.3