summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorOliver Tappe2007-04-15 13:27:53 +0200
committerOliver Tappe2007-04-15 13:27:53 +0200
commit128056b3f79a75a48f0320f1ab98c97f9e4a1854 (patch)
tree9a55f81ccec360954da1f90a2c4c681959b411a9 /installer
parent* cleanup with respect to how modules/classes are loaded (diff)
downloadcore-128056b3f79a75a48f0320f1ab98c97f9e4a1854.tar.gz
core-128056b3f79a75a48f0320f1ab98c97f9e4a1854.tar.xz
core-128056b3f79a75a48f0320f1ab98c97f9e4a1854.zip
* activated check for required modules in slxos-export, such that you can only create
an nfs-squash export if the vendor-OS actually has support for that included... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@891 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/OpenSLX/OSExport/Engine.pm4
-rw-r--r--installer/OpenSLX/OSExport/ExportType/Base.pm1
-rw-r--r--installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm12
3 files changed, 12 insertions, 5 deletions
diff --git a/installer/OpenSLX/OSExport/Engine.pm b/installer/OpenSLX/OSExport/Engine.pm
index a54042c5..58ff3eb1 100644
--- a/installer/OpenSLX/OSExport/Engine.pm
+++ b/installer/OpenSLX/OSExport/Engine.pm
@@ -125,6 +125,10 @@ sub exportVendorOS
{
my $self = shift;
+ if (!$self->{'exporter'}->checkRequirements($self->{'vendor-os-path'})) {
+ die _tr("clients wouldn't be able to access the exported root-fs!\nplease install the missing module(s) or use another export-type.");
+ }
+
$self->{'exporter'}->exportVendorOS(
$self->{'vendor-os-path'},
$self->{'export-path'}
diff --git a/installer/OpenSLX/OSExport/ExportType/Base.pm b/installer/OpenSLX/OSExport/ExportType/Base.pm
index 955b6bca..06b6d0da 100644
--- a/installer/OpenSLX/OSExport/ExportType/Base.pm
+++ b/installer/OpenSLX/OSExport/ExportType/Base.pm
@@ -48,6 +48,7 @@ sub purgeExport
sub checkRequirements
{
+ 1;
}
################################################################################
diff --git a/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm b/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm
index d103868d..bfab86a8 100644
--- a/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm
+++ b/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm
@@ -72,17 +72,19 @@ sub checkRequirements
while (-l "$vendorOSPath/boot/$kernel") {
$kernel = readlink "$vendorOSPath/boot/$kernel";
}
- if ($kernel !~ m[^vmlinuz-(.+?)(\..+)?$]) {
+ if ($kernel !~ m[^vmlinuz-(.+)$]) {
die _tr("unable to determine version of kernel '%s'!", $kernel);
}
my $kernelVer = $1;
if (!-e "$vendorOSPath/lib/modules/$kernelVer/kernel/drivers/block/nbd.ko") {
- warn _tr("unable to find nbd-module for kernel '%s',\nclients wouldn't be able to access the exported root-fs!",
- $kernel);
+ warn _tr("unable to find nbd-module for kernel version '%s'.",
+ $kernelVer);
+ return 0;
}
if (!-e "$vendorOSPath/lib/modules/$kernelVer/kernel/fs/squashfs.ko") {
- warn _tr("unable to find squashfs-module for kernel '%s',\nclients wouldn't be able to access the exported root-fs!",
- $kernel);
+ warn _tr("unable to find squashfs-module for kernel version '%s'.",
+ $kernelVer);
+ return 0;
}
}