diff options
author | Oliver Tappe | 2008-02-03 15:16:34 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-02-03 15:16:34 +0100 |
commit | 30f69d497b5ae933c7988a3cdc81c1617ea9a8ef (patch) | |
tree | 06f3b49b080bc3abde771b13c92ed24c31806331 /config-db | |
parent | * switched config-demuxer over to internal generation of initramfs (diff) | |
download | core-30f69d497b5ae933c7988a3cdc81c1617ea9a8ef.tar.gz core-30f69d497b5ae933c7988a3cdc81c1617ea9a8ef.tar.xz core-30f69d497b5ae933c7988a3cdc81c1617ea9a8ef.zip |
* 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
Diffstat (limited to 'config-db')
-rwxr-xr-x | config-db/slxconfig-demuxer | 15 |
1 files changed, 11 insertions, 4 deletions
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); |