diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-config-loader.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl index a03a0e4..809c5dd 100755 --- a/scripts/vyatta-config-loader.pl +++ b/scripts/vyatta-config-loader.pl @@ -112,6 +112,14 @@ foreach (@all_nodes) { } } +$ret = system("$commit_cmd"); +if ($ret >> 8) { + print OLDOUT "Commit failed at boot\n"; + print WARN "Commit failed at boot\n"; + system("$cleanup_cmd"); + # exit normally after cleanup (or should we exit with error?) +} + # Now deactivate these nodes for (@deactivate_nodes) { my $cmd = "$CWRAPPER deactivate " . $_; @@ -126,6 +134,7 @@ if ($ret >> 8) { # exit normally after cleanup (or should we exit with error?) } + # really clean up system("$CWRAPPER end"); restore_fds(); |