summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm
diff options
context:
space:
mode:
Diffstat (limited to 'installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm')
-rw-r--r--installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm b/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm
index 770107a7..d103868d 100644
--- a/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm
+++ b/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm
@@ -63,6 +63,29 @@ sub purgeExport
1;
}
+sub checkRequirements
+{
+ my $self = shift;
+ my $vendorOSPath = shift;
+ my $kernel = shift || 'vmlinuz';
+
+ while (-l "$vendorOSPath/boot/$kernel") {
+ $kernel = readlink "$vendorOSPath/boot/$kernel";
+ }
+ 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);
+ }
+ 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);
+ }
+}
+
################################################################################
### implementation methods
################################################################################