summaryrefslogtreecommitdiff
path: root/scripts/vyatta-config-loader.pl
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-04-21 17:28:55 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-04-21 17:28:55 -0700
commita9ee6ae9f37d066a022341ecc472e9560bc64fb1 (patch)
tree4d36f24f922db15d81395131c749b2f4830f68a7 /scripts/vyatta-config-loader.pl
parentfa0ba2ecb40898257a1e18b176db187fe0baebf1 (diff)
downloadvyatta-cfg-a9ee6ae9f37d066a022341ecc472e9560bc64fb1.tar.gz
vyatta-cfg-a9ee6ae9f37d066a022341ecc472e9560bc64fb1.zip
Add some debug files to help diagnose boot issue with new cli ordering.
These should be removed before release.
Diffstat (limited to 'scripts/vyatta-config-loader.pl')
-rwxr-xr-xscripts/vyatta-config-loader.pl11
1 files changed, 5 insertions, 6 deletions
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?)
}