summaryrefslogtreecommitdiff
path: root/scripts/vyatta-load-config.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-rwxr-xr-xscripts/vyatta-load-config.pl9
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";