summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig-demuxer
diff options
context:
space:
mode:
authorOliver Tappe2007-03-23 00:25:58 +0100
committerOliver Tappe2007-03-23 00:25:58 +0100
commite5a7b403cd48a87955a390c78139d4c489bfd0a1 (patch)
tree0a9b91fbef184a7fc5833084ab41e6e8a9296c05 /config-db/slxconfig-demuxer
parent* completed this script: (diff)
downloadcore-e5a7b403cd48a87955a390c78139d4c489bfd0a1.tar.gz
core-e5a7b403cd48a87955a390c78139d4c489bfd0a1.tar.xz
core-e5a7b403cd48a87955a390c78139d4c489bfd0a1.zip
* adjusted to changed DB-schema
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@801 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig-demuxer')
-rwxr-xr-xconfig-db/slxconfig-demuxer50
1 files changed, 23 insertions, 27 deletions
diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer
index b35489cd..97d7af2f 100755
--- a/config-db/slxconfig-demuxer
+++ b/config-db/slxconfig-demuxer
@@ -265,20 +265,18 @@ sub writePXEMenus
my @systemIDs = $openslxDB->aggregatedSystemIDsOfClient($client);
my @systems = $openslxDB->fetchSystemByID(\@systemIDs);
foreach my $system (@systems) {
- my @infos = $openslxDB->aggregatedSystemFileInfosOfSystem($system);
- foreach my $info (@infos) {
- my $extSysID = externalIDForSystem($info);
- my $append = $system->{kernel_params};
- $append .= " initrd=$extSysID/initramfs";
- $append .= " $clientAppend";
- $append .= " rootfs=$info->{'export-uri'} file";
- print PXE "LABEL openslx-$extSysID\n";
-# print PXE "\tMENU DEFAULT\n";
- print PXE "\tMENU LABEL ^$info->{label}\n";
- print PXE "\tKERNEL $extSysID/kernel\n";
- print PXE "\tAPPEND $append\n";
- print PXE "\tIPAPPEND 1\n";
- }
+ my $info = $openslxDB->aggregatedSystemFileInfoFor($system);
+ my $extSysID = externalIDForSystem($info);
+ my $append = $system->{kernel_params};
+ $append .= " initrd=$extSysID/initramfs";
+ $append .= " $clientAppend";
+ $append .= " rootfs=$info->{'export-uri'} file";
+ print PXE "LABEL openslx-$extSysID\n";
+# print PXE "\tMENU DEFAULT\n";
+ print PXE "\tMENU LABEL ^$info->{label}\n";
+ print PXE "\tKERNEL $extSysID/kernel\n";
+ print PXE "\tAPPEND $append\n";
+ print PXE "\tIPAPPEND 1\n";
}
close(PXE);
}
@@ -349,20 +347,18 @@ sub writeSystemPXEFiles
my $export = $openslxDB->fetchExportByID($system->{export_id});
my $vendorOS = $openslxDB->fetchVendorOSByID($export->{vendor_os_id});
- my @infos = $openslxDB->aggregatedSystemFileInfosOfSystem($system);
- foreach my $info (@infos) {
- my $kernelFile = $info->{'kernel-file'};
- my $extSysID = externalIDForSystem($info);
- my $pxeSysPath = "$pxePath/$extSysID";
- if (-e $pxeSysPath) {
- die _tr('PXE-system %s already exists!', $pxeSysPath);
- }
- mkdir $pxeSysPath;
- vlog 1, _tr('copying kernel %s to %s/kernel', $kernelFile, $pxeSysPath);
- system(qq[cp -p "$kernelFile" $pxeSysPath/kernel]) unless $dryRun;
-
- generateInitalRamFS($info, $vendorOS, $pxeSysPath);
+ my $info = $openslxDB->aggregatedSystemFileInfoFor($system);
+ my $kernelFile = $info->{'kernel-file'};
+ my $extSysID = externalIDForSystem($info);
+ my $pxeSysPath = "$pxePath/$extSysID";
+ if (-e $pxeSysPath) {
+ die _tr('PXE-system %s already exists!', $pxeSysPath);
}
+ mkdir $pxeSysPath;
+ vlog 1, _tr('copying kernel %s to %s/kernel', $kernelFile, $pxeSysPath);
+ system(qq[cp -p "$kernelFile" $pxeSysPath/kernel]) unless $dryRun;
+
+ generateInitalRamFS($info, $vendorOS, $pxeSysPath);
}
sub writeDhcpConfig