summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig-demuxer
diff options
context:
space:
mode:
authorOliver Tappe2008-08-31 17:57:11 +0200
committerOliver Tappe2008-08-31 17:57:11 +0200
commit378c55365a34cc8ae1e6aeba38421cabe08bdeba (patch)
tree394f95c9572ac5abfe68b9b397291af760e9eb63 /config-db/slxconfig-demuxer
parent* refactored slxconfig-demuxer and boot environment implementations such that (diff)
downloadcore-378c55365a34cc8ae1e6aeba38421cabe08bdeba.tar.gz
core-378c55365a34cc8ae1e6aeba38421cabe08bdeba.tar.xz
core-378c55365a34cc8ae1e6aeba38421cabe08bdeba.zip
* write client config only to boot environment that matches the client, not to all
boot environments git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2161 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig-demuxer')
-rwxr-xr-xconfig-db/slxconfig-demuxer25
1 files changed, 13 insertions, 12 deletions
diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer
index 75b4a03c..9628afab 100755
--- a/config-db/slxconfig-demuxer
+++ b/config-db/slxconfig-demuxer
@@ -417,12 +417,15 @@ sub writeClientConfigurationsForSystem
my $info = shift;
my $buildPath = shift;
my $attrFile = shift;
+ my $bootType = shift;
my $clients = shift || [];
- my $bootEnvs = shift || [];
foreach my $client (@$clients) {
next if $client->{name} eq '<<<default>>>';
# skip default client, as it doesn't need any config-tgz
+
+ next if ($client->{boot_type} || 'pxe') ne $bootType;
+ # skip clients with non-matching boot type
my $externalSystemID = $info->{'external-id'};
my $externalClientName = externalConfigNameForClient($client);
@@ -481,12 +484,11 @@ sub writeClientConfigurationsForSystem
# be accessed from the client-PC, which doesn't know about the
# name it is referred to in the openslx-config-DB:
my $externalClientID = externalIDForClient($client);
- foreach my $bootEnv (@$bootEnvs) {
- createTarOfPath(
- $buildPath, "${externalClientID}.tgz",
- "$bootEnv->{'target-path'}/client-config/$externalSystemID"
- );
- }
+ my $bootEnv = bootEnvironmentForType($bootType);
+ createTarOfPath(
+ $buildPath, "${externalClientID}.tgz",
+ "$bootEnv->{'target-path'}/client-config/$externalSystemID"
+ );
}
}
return;
@@ -569,12 +571,10 @@ sub createBootEnvironmentsForSystem
my $type = $client->{boot_type} || 'pxe';
$bootTypes{$type}++;
}
- my @bootEnvs;
foreach my $bootType (sort keys %bootTypes) {
vlog(0, _tr("creating boot environment for $bootType"));
my $bootEnv = bootEnvironmentForType($bootType);
- push @bootEnvs, $bootEnv;
$bootEnv->writeFilesRequiredForBooting(
$info, $buildPath, $slxVersion
);
@@ -583,10 +583,11 @@ sub createBootEnvironmentsForSystem
my $systemPath
= "$bootEnv->{'target-path'}/client-config/$info->{'external-id'}";
createTarOfPath($buildPath, "default.tgz", $systemPath);
+
+ writeClientConfigurationsForSystem(
+ $info, $buildPath, $attrFile, $bootType, $clients
+ );
}
- writeClientConfigurationsForSystem(
- $info, $buildPath, $attrFile, $clients, \@bootEnvs
- );
return;
}