From d561c9b1d1440185a5000c3d4df4395ba6de9a22 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 29 May 2007 20:06:16 +0000 Subject: * changed handling of exports to drop support for having more than one export for a given vendor-OS with the same export-type * exports are now named according to the pattern - (instead of - where X was a letter) * change slxos-export to show the export-config-info after updating an export, too (not only after creating a new export). git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1108 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/OpenSLX/OSExport/ExportType/Base.pm | 4 +++ .../OpenSLX/OSExport/ExportType/NBD_Squash.pm | 23 ++++++++--------- installer/OpenSLX/OSExport/ExportType/NFS.pm | 29 +++++++++++----------- 3 files changed, 29 insertions(+), 27 deletions(-) (limited to 'installer/OpenSLX/OSExport/ExportType') diff --git a/installer/OpenSLX/OSExport/ExportType/Base.pm b/installer/OpenSLX/OSExport/ExportType/Base.pm index e0f5c5be..7e0aa464 100644 --- a/installer/OpenSLX/OSExport/ExportType/Base.pm +++ b/installer/OpenSLX/OSExport/ExportType/Base.pm @@ -68,6 +68,10 @@ sub requiredFSMods { } +sub showExportConfigInfo +{ +} + ################################################################################ ### implementation methods ################################################################################ diff --git a/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm b/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm index f721d6d2..bb26a619 100644 --- a/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm +++ b/installer/OpenSLX/OSExport/ExportType/NBD_Squash.pm @@ -113,7 +113,6 @@ sub addExportToConfigDB = $openslxDB->incrementGlobalCounter('next-nbd-server-port'); my $res = $openslxDB->addExport($export); - $self->showNbdParams($export) if $res; return $res; } @@ -138,6 +137,17 @@ sub requiredFSMods return 'nbd squashfs'; } +sub showExportConfigInfo +{ + my $self = shift; + my $export = shift; + + print (('#' x 80)."\n"); + print _tr("Please make sure you start a corresponding nbd-server:\n\t%s\n", + "nbd-server $export->{port} $self->{engine}->{'export-path'} -r"); + print (('#' x 80)."\n"); +} + ################################################################################ ### implementation methods ################################################################################ @@ -182,17 +192,6 @@ sub createSquashFS } } -sub showNbdParams -{ - my $self = shift; - my $export = shift; - - print (('#' x 80)."\n"); - print _tr("Please make sure you start a corresponding nbd-server:\n\t%s\n", - "nbd-server $export->{port} $self->{engine}->{'export-path'} -r"); - print (('#' x 80)."\n"); -} - sub mapRsyncFilter2Regex { my $sourcePath = shift; diff --git a/installer/OpenSLX/OSExport/ExportType/NFS.pm b/installer/OpenSLX/OSExport/ExportType/NFS.pm index e3cd9cce..f63a2d23 100644 --- a/installer/OpenSLX/OSExport/ExportType/NFS.pm +++ b/installer/OpenSLX/OSExport/ExportType/NFS.pm @@ -44,7 +44,6 @@ sub exportVendorOS my $target = shift; $self->copyViaRsync($source, $target); - $self->addTargetToNfsExports($target); } sub purgeExport @@ -80,6 +79,20 @@ sub requiredFSMods return 'nfs'; } +sub showExportConfigInfo +{ + my $self = shift; + my $export = shift; + + print (('#' x 80)."\n"); + print _tr("Please make sure the following line is contained in /etc/exports\nin order to activate the NFS-export of this vendor-OS:\n\t%s\n", + "$self->{engine}->{'export-path'}\t*(ro,no_root_squash,async,no_subtree_check)"); + print (('#' x 80)."\n"); + +# TODO : add something a bit more clever here... +# my $exports = slurpFile("/etc/exports"); +} + ################################################################################ ### implementation methods ################################################################################ @@ -105,18 +118,4 @@ sub copyViaRsync } } -sub addTargetToNfsExports -{ - my $self = shift; - my $target = shift; - - print (('#' x 80)."\n"); - print _tr("Please make sure the following line is contained in /etc/exports\nin order to activate the NFS-export of this vendor-OS:\n\t%s\n", - "$self->{engine}->{'export-path'}\t*(ro,no_root_squash,async,no_subtree_check)"); - print (('#' x 80)."\n"); - -# TODO : add something a bit more clever here... -# my $exports = slurpFile("/etc/exports"); -} - 1; -- cgit v1.2.3-55-g7522