From 30f69d497b5ae933c7988a3cdc81c1617ea9a8ef Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 3 Feb 2008 14:16:34 +0000 Subject: * the config-demuxer no longer writes the configurations for all systems if one or more specific targets have been given. Only target systems get their configuration written, their kernel copied and their initramfs generated. All other systems are just incorporated into the PXE menu. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1512 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/slxconfig-demuxer | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'config-db') diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index d91e5b46..491bc425 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -716,6 +716,16 @@ sub writeSystemConfiguration { my $info = shift; + # if this is not a target system, we shall not write any configurations, + # but we simply incorporate inherited attributes + my $isTargetSystem = first { $_->{name} eq $info->{name} } @targetSystems; + if (!$isTargetSystem) { + $openslxDB->mergeDefaultAttributesIntoSystem($info); + $info->{'initramfs-name'} = "initramfs-$info->{id}"; + return; + } + + # write configuration files for this system my $buildPath = "$tempPath/build"; copyExternalSystemConfig(externalIDForSystem($info), $buildPath); @@ -736,11 +746,8 @@ sub writeSystemConfiguration my $systemPath = "$tftpbootPath/client-config/$info->{'external-id'}"; createTarOfPath($buildPath, "default.tgz", $systemPath); - # copy kernel and generate initramfs only if this is a target system $info->{'initramfs-name'} = "initramfs-$info->{id}"; - if (grep { $_->{name} eq $info->{name} } @targetSystems) { - writeSystemPXEFiles($info); - } + writeSystemPXEFiles($info); writeClientConfigurationsForSystem($info, $buildPath, $attrFile); -- cgit v1.2.3-55-g7522