diff options
-rw-r--r-- | config-db/OpenSLX/ConfigDB.pm | 12 | ||||
-rwxr-xr-x | config-db/slxconfig-demuxer | 11 |
2 files changed, 13 insertions, 10 deletions
diff --git a/config-db/OpenSLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm index e619c660..efe15078 100644 --- a/config-db/OpenSLX/ConfigDB.pm +++ b/config-db/OpenSLX/ConfigDB.pm @@ -863,9 +863,15 @@ sub aggregatedSystemFileInfoFor my $system = shift; my $export = $self->fetchExportByID($system->{export_id}); - return () if !$export || !length($export->{name}); + if (!defined $export) { + die _tr("DB-problem: system '%s' references export with id=%s, but that doesn't exist!", + $system->{name}, $system->{export_id}); + } my $vendorOS = $self->fetchVendorOSByID($export->{vendor_os_id}); - return () if !$vendorOS || !length($vendorOS->{name}); + if (!defined $vendorOS) { + die _tr("DB-problem: export '%s' references vendor-OS with id=%s, but that doesn't exist!", + $export->{name}, $export->{vendor_os_id}); + } my $kernelPath = "$openslxConfig{'private-path'}/stage1/$vendorOS->{name}/boot"; @@ -881,6 +887,8 @@ sub aggregatedSystemFileInfoFor my $info = { %$system }; $info->{'kernel-file'} = "$kernelPath/$system->{kernel}"; $info->{'export-uri'} = $exportURI; + $info->{'export'} = $export; + $info->{'vendor-os'} = $vendorOS; return $info; } diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index 7b854918..d1c2c11b 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -302,9 +302,6 @@ sub generateInitalRamFS vlog 1, _tr('generating initialramfs %s/initramfs', $pxeSysPath); my $cmd = "$openslxConfig{'bin-path'}/slxmkramfs "; - if ($setup->{ramfs_use_glibc}) { - $cmd .= '-g '; - } if ($setup->{ramfs_use_busybox}) { $cmd .= '-b '; } @@ -358,13 +355,11 @@ sub writeSystemPXEFiles { my $system = shift; - my $pxePath = "$tftpbootPath/pxe"; - - my $export = $openslxDB->fetchExportByID($system->{export_id}); - my $vendorOS = $openslxDB->fetchVendorOSByID($export->{vendor_os_id}); my $info = $openslxDB->aggregatedSystemFileInfoFor($system); my $kernelFile = $info->{'kernel-file'}; my $extSysID = externalIDForSystem($info); + + my $pxePath = "$tftpbootPath/pxe"; my $pxeSysPath = "$pxePath/$extSysID"; if (-e $pxeSysPath) { die _tr('PXE-system %s already exists!', $pxeSysPath); @@ -373,7 +368,7 @@ sub writeSystemPXEFiles vlog 1, _tr('copying kernel %s to %s/kernel', $kernelFile, $pxeSysPath); system(qq[cp -p "$kernelFile" $pxeSysPath/kernel]) unless $dryRun; - generateInitalRamFS($info, $vendorOS, $pxeSysPath); + generateInitalRamFS($info, $info->{'vendor-os'}, $pxeSysPath); } sub writeDhcpConfig |