summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig-demuxer
diff options
context:
space:
mode:
authorOliver Tappe2009-02-07 23:05:17 +0100
committerOliver Tappe2009-02-07 23:05:17 +0100
commitae11e72ebcd55bfe96f9c72642e9f3ab156de97e (patch)
treee8ed00c485c4d49f5236d32c0757ca130da35700 /config-db/slxconfig-demuxer
parent* fixed an uninitialized warning in syslog plugin (which indicated an error) (diff)
downloadcore-ae11e72ebcd55bfe96f9c72642e9f3ab156de97e.tar.gz
core-ae11e72ebcd55bfe96f9c72642e9f3ab156de97e.tar.xz
core-ae11e72ebcd55bfe96f9c72642e9f3ab156de97e.zip
* fixed a bug that caused the plugin-conf directory to be created only
once, not for every client (which is required since the build path for configs is cleansed for every configuration) * improved a couple of comments git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2571 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig-demuxer')
-rwxr-xr-xconfig-db/slxconfig-demuxer18
1 files changed, 10 insertions, 8 deletions
diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer
index 49336ffa..0e0cde71 100755
--- a/config-db/slxconfig-demuxer
+++ b/config-db/slxconfig-demuxer
@@ -286,15 +286,14 @@ sub copyExternalSystemConfig
if (-d $defaultConfigPath) {
slxsystem("cp -a $defaultConfigPath/* $targetPath");
}
- # ... now pour system-specific configuration on top (if any):
+ # ... now pour system-specific configuration on top (if any) ...
my $systemSpecConfigPath = "$clientConfigPath/$systemName/default";
vlog(2, "checking $systemSpecConfigPath for system config...");
if (folderContainsFiles($systemSpecConfigPath)) {
slxsystem("cp -a $systemSpecConfigPath/* $targetPath");
}
if (defined $clientName) {
- # client has been given, so we finally pour client-specific
- # configuration on top (if any):
+ # ... and finally pour client-specific configuration on top (if any):
my $clientSpecConfigPath = "$clientConfigPath/$systemName/$clientName";
vlog(2, "checking $clientSpecConfigPath for client config...");
if (folderContainsFiles($clientSpecConfigPath)) {
@@ -411,11 +410,12 @@ sub writeClientConfigurationsForSystem
my $clientConfigPath
= "$clientConfigPath/$externalSystemID/$externalClientName";
- # merge configurations of client, it's groups, default client and
- # system and write the resulting attributes to a configuration file:
+ # merge configurations of groups, default client and system into the
+ # current client (overwriting only values the client does not specify)
$openslxDB->mergeDefaultAndGroupAttributesIntoClient($client);
mergeAttributes($client, $info);
+ # compute a digest value of the merged attributes ...
my $clientAttrDigest = digestAttributes($client);
vlog(
2,
@@ -424,7 +424,7 @@ sub writeClientConfigurationsForSystem
$clientAttrDigest
)
);
- # export client-specific config only if attributes are different
+ # ... and export client-specific config only if attributes are different
# from system and/or a client-specific config-folder exists:
if ($clientAttrDigest ne $info->{'attr-digest'}
|| -d $clientConfigPath)
@@ -444,6 +444,9 @@ sub writeClientConfigurationsForSystem
$externalSystemID, $buildPath, $externalClientName
);
+ # add plugin configuration
+ writePluginConfigurationsForSystem($info, $buildPath);
+
# check attributes against illegal values and write them into
# a file if they're ok:
my $attrProblems = OpenSLX::AttributeRoster->findProblematicValues(
@@ -614,11 +617,10 @@ sub writeSystemConfiguration
warn $complaint;
}
- my $attrFile = "$buildPath/initramfs/machine-setup";
-
writePluginConfigurationsForSystem($info, $buildPath);
# create all required (pre-)boot-environments (PXE, CD, ...)
+ my $attrFile = "$buildPath/initramfs/machine-setup";
my @clientIDs = $openslxDB->aggregatedClientIDsOfSystem($info);
my @clients = $openslxDB->fetchClientByID(\@clientIDs);
createBootEnvironmentsForSystem($info, $buildPath, $attrFile, \@clients);