summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig-demuxer
diff options
context:
space:
mode:
authorOliver Tappe2009-01-28 17:45:07 +0100
committerOliver Tappe2009-01-28 17:45:07 +0100
commitba096482941b394ddda2afb2f07739d954ce5f4d (patch)
treeb3e3a5bc95cc573ce7738ba44dd16e69e6ae66e9 /config-db/slxconfig-demuxer
parentRearranging preboot environment file structure. (diff)
downloadcore-ba096482941b394ddda2afb2f07739d954ce5f4d.tar.gz
core-ba096482941b394ddda2afb2f07739d954ce5f4d.tar.xz
core-ba096482941b394ddda2afb2f07739d954ce5f4d.zip
* in case of error during creation of bootmenu files, the demuxer no longer
stops, but catches the exception and continues to run, showing any errors in the final summary git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2538 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig-demuxer')
-rwxr-xr-xconfig-db/slxconfig-demuxer23
1 files changed, 20 insertions, 3 deletions
diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer
index b9f2a8dd..9badee07 100755
--- a/config-db/slxconfig-demuxer
+++ b/config-db/slxconfig-demuxer
@@ -56,6 +56,8 @@ my (
# number of system configurations written
$systemErrCount,
# number of systems that had errors
+ $bootEnvErrCount,
+ # number of boot environments that had errors
$clientSystemConfCount,
# number of (system-specific) client configurations written
$initramfsCount,
@@ -153,12 +155,18 @@ writeConfigurations();
my $wr = $option{dryRun} ? 'would have written' : 'wrote';
my $errCount = $systemErrCount ? $systemErrCount : 'no';
-my $statusString
+my $systemStatusString
= $systemErrCount ? "$errCount system(s) had errors" : 'all systems ok';
+$errCount = $bootEnvErrCount ? $bootEnvErrCount : 'no';
+my $bootEnvStatusString
+ = $bootEnvErrCount
+ ? "$errCount boot environment(s) had errors"
+ : 'all boot-environments ok';
print "\n", unshiftHereDoc(<<"End-of-Here");
$wr $systemConfCount system-specific and $clientSystemConfCount client-specific configurations
$initramfsCount initramfs were created
- $statusString
+ $systemStatusString
+ $bootEnvStatusString
End-of-Here
$openslxDB->disconnect();
@@ -355,7 +363,16 @@ sub writeBootloaderMenus
# now write bootloader menu with all bootable systems for this client
my $bootEnv = bootEnvironmentForType($client->{attrs}->{boot_type});
my $externalID = externalIDForClient($client);
- $bootEnv->writeBootloaderMenuFor($client, $externalID, \@systemInfos);
+ my $success = eval {
+ $bootEnv->writeBootloaderMenuFor(
+ $client, $externalID, \@systemInfos
+ );
+ 1;
+ };
+ if (!$success) {
+ print STDERR $@;
+ $bootEnvErrCount++;
+ }
}
return;
}