summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig-demuxer
diff options
context:
space:
mode:
authorOliver Tappe2009-02-03 21:14:51 +0100
committerOliver Tappe2009-02-03 21:14:51 +0100
commit6cc0301ce1c41da47228dce70c7623b44d04338b (patch)
tree665d82a8ea2798ae70ba8fdb068c5c8b8305cf8a /config-db/slxconfig-demuxer
parent* added requiresDefaultClientConfig() which is going to be used by the config (diff)
downloadcore-6cc0301ce1c41da47228dce70c7623b44d04338b.tar.gz
core-6cc0301ce1c41da47228dce70c7623b44d04338b.tar.xz
core-6cc0301ce1c41da47228dce70c7623b44d04338b.zip
* Fixed TODO introduced by Sebastian: we generated completely bogus contents
of default.tgz if more than one boot-env was active. Now we generate default.tgz at the right moment and additionally ask each boot environment if the default client configuration is required at all (which is not the case for preboot environments, since they will always have at least one specific client, which is being used for booting) * minor cleanup git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2568 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig-demuxer')
-rwxr-xr-xconfig-db/slxconfig-demuxer30
1 files changed, 15 insertions, 15 deletions
diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer
index 9c10190e..49336ffa 100755
--- a/config-db/slxconfig-demuxer
+++ b/config-db/slxconfig-demuxer
@@ -237,8 +237,8 @@ sub writeAttributesToFile
$content .= qq[$attr="$attrVal"\n];
}
# Overwrite attribute file even if it exists, to make sure that our users
- # will never again try to fiddle with machine-setup directly the
- # file-system. From now on the DB is the keeper of that info.
+ # will never try to fiddle with machine-setup directly in the file-system.
+ # The config-DB is the keeper of that info!
spitFile($fileName, $content);
if ($openslxConfig{'log-level'} > 2) {
vlog(0, "--- START OF $fileName ---");
@@ -557,17 +557,18 @@ sub createBootEnvironmentsForSystem
$initramfsCount
+= $bootEnv->writeFilesRequiredForBooting($info, $buildPath);
- # TODO: use different paths for other boot environments
- # QUICK FIX: only write something for pxe at the moment
- if ($bootType eq 'pxe') {
- my $systemPath
- = "$bootEnv->{'target-path'}/client-config/$info->{'external-id'}";
- createTarOfPath($buildPath, "default.tgz", $systemPath);
-
- writeClientConfigurationsForSystem(
- $info, $buildPath, $attrFile, $bootType, $clients
- );
- }
+ # only create a default.tgz if required by boot environment
+ if ($bootEnv->requiresDefaultClientConfig()) {
+ writeAttributesToFile($info, $attrFile);
+
+ my $systemPath
+ = "$bootEnv->{'target-path'}/client-config/$info->{'external-id'}";
+ createTarOfPath($buildPath, "default.tgz", $systemPath);
+ }
+
+ writeClientConfigurationsForSystem(
+ $info, $buildPath, $attrFile, $bootType, $clients
+ );
}
return;
@@ -614,8 +615,7 @@ sub writeSystemConfiguration
}
my $attrFile = "$buildPath/initramfs/machine-setup";
- writeAttributesToFile($info, $attrFile);
-
+
writePluginConfigurationsForSystem($info, $buildPath);
# create all required (pre-)boot-environments (PXE, CD, ...)