summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-cfg-cmd-wrapper5
-rwxr-xr-xscripts/vyatta-config-loader.pl11
2 files changed, 9 insertions, 7 deletions
diff --git a/scripts/vyatta-cfg-cmd-wrapper b/scripts/vyatta-cfg-cmd-wrapper
index e994742..144fc2a 100755
--- a/scripts/vyatta-cfg-cmd-wrapper
+++ b/scripts/vyatta-cfg-cmd-wrapper
@@ -80,7 +80,10 @@ case "$1" in
RET_STATUS=$?
;;
commit)
- /opt/vyatta/sbin/my_commit
+ # debug file /tmp/bar should be deleted before release
+ /opt/vyatta/sbin/my_commit -a >> /tmp/bar
+ /opt/vyatta/sbin/my_commit -s >> /tmp/bar
+ /opt/vyatta/sbin/my_commit -e -d >> /tmp/bar
RET_STATUS=$?
;;
save)
diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl
index 35ca145..a32d1fc 100755
--- a/scripts/vyatta-config-loader.pl
+++ b/scripts/vyatta-config-loader.pl
@@ -66,8 +66,6 @@ if ($? >> 8) {
}
#cmd below is added to debug last set of command ordering
-my $commit_cmd_debug_noop = "$CWRAPPER commit -a > /tmp/bar";
-my $commit_cmd_debug = "$CWRAPPER commit -d";
my $commit_cmd = "$CWRAPPER commit";
my $cleanup_cmd = "$CWRAPPER cleanup";
my $ret = 0;
@@ -86,6 +84,8 @@ foreach (@all_nodes) {
$cur_rank = $rank;
}
my $cmd = "$CWRAPPER set " . (join ' ', @$path_ref);
+ # this debug file should be deleted before release
+ system("echo [$cmd] >> /tmp/foo");
$ret = system("$cmd");
if ($ret >> 8) {
$cmd =~ s/^.*?set /set /;
@@ -94,11 +94,10 @@ foreach (@all_nodes) {
# continue after set failure (or should we abort?)
}
}
-system("$commit_cmd_debug_noop");
-$ret = system("$commit_cmd_debug");
+$ret = system("$commit_cmd");
if ($ret >> 8) {
- print OLDOUT "Commit failed at rank $cur_rank\n";
- print WARN "Commit failed at rank $cur_rank\n";
+ 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?)
}