diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-04 17:54:56 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-04 17:54:56 -0700 |
commit | 0ffdc5e6d89f9677694a8eef916b07c089264753 (patch) | |
tree | 08f9693bdad87301ebb1306de73d77888df84413 /scripts/vyatta-load-config.pl | |
parent | 576e0fed6b0e32bb92915a10f95677303eda478a (diff) | |
download | vyatta-cfg-0ffdc5e6d89f9677694a8eef916b07c089264753.tar.gz vyatta-cfg-0ffdc5e6d89f9677694a8eef916b07c089264753.zip |
initial working version of activate and deactivate: load,save,show,commit supported.
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-rwxr-xr-x | scripts/vyatta-load-config.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl index f0dbaf1..ab5a47e 100755 --- a/scripts/vyatta-load-config.pl +++ b/scripts/vyatta-load-config.pl @@ -190,6 +190,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'} }; if ($merge_mode eq 'false') { my @delete_list = @{ $cfg_diff{'delete'} }; @@ -217,6 +218,14 @@ foreach (@set_list) { } } +foreach (@deactivate_list) { + my ( $cmd_ref, $rank ) = @{$_}; + my @cmd = ( "$sbindir/vyatta-activate-config.pl deactivate", @{$cmd_ref} ); + my $cmd_str = join ' ', @cmd; + system("$cmd_str 1>/dev/null"); + #ignore error on complaint re: nested nodes +} + system("$sbindir/my_commit"); if ( $? >> 8 ) { print "Load failed (commit failed)\n"; |