diff options
author | Oliver Tappe | 2007-03-14 22:38:33 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-03-14 22:38:33 +0100 |
commit | 275a583f5fad043e2fd54c2de4f1f44ec9f1ead4 (patch) | |
tree | 8e86d30f4d6c37065f3965f747392d0d30c00fc5 | |
parent | * added two checks around cloning in order to protect users from making bad (diff) | |
download | core-275a583f5fad043e2fd54c2de4f1f44ec9f1ead4.tar.gz core-275a583f5fad043e2fd54c2de4f1f44ec9f1ead4.tar.xz core-275a583f5fad043e2fd54c2de4f1f44ec9f1ead4.zip |
* applied several fixed to svnos-export and respective modules (as reported by Dirk)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@772 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | installer/OpenSLX/OSExport/Engine.pm | 4 | ||||
-rw-r--r-- | installer/OpenSLX/OSExport/ExportType/NFS.pm | 13 | ||||
-rwxr-xr-x | installer/slxos-export | 25 |
3 files changed, 20 insertions, 22 deletions
diff --git a/installer/OpenSLX/OSExport/Engine.pm b/installer/OpenSLX/OSExport/Engine.pm index 085d10f7..413f5fde 100644 --- a/installer/OpenSLX/OSExport/Engine.pm +++ b/installer/OpenSLX/OSExport/Engine.pm @@ -167,6 +167,9 @@ sub addExportToConfigDB { my $self = shift; +print "adding the export to the config-DB is not implemented yet, sorry!\n"; +return; + my $configDBModule = "OpenSLX::ConfigDB"; unless (eval "require $configDBModule") { if ($! == 2) { @@ -184,6 +187,7 @@ sub addExportToConfigDB my $openslxDB = connectConfigDB(); # insert new export if it doesn't already exist in DB: my $exportName = $self->{'vendor-os-name'}; + my $export = fetchExportsByFilter( $openslxDB, { 'name' => $exportName }, 'id' ); diff --git a/installer/OpenSLX/OSExport/ExportType/NFS.pm b/installer/OpenSLX/OSExport/ExportType/NFS.pm index b5529502..ccaa32c5 100644 --- a/installer/OpenSLX/OSExport/ExportType/NFS.pm +++ b/installer/OpenSLX/OSExport/ExportType/NFS.pm @@ -58,6 +58,10 @@ sub exportViaRsync my $source = shift; my $target = shift; + if (system("mkdir -p $target")) { + die _tr("unable to create directory '%s', giving up! (%s)\n", + $target, $!); + } my $includeExcludeList = $self->determineIncludeExcludeList(); vlog 1, "using include-exclude-filter:\n$includeExcludeList\n"; open(RSYNC, "| rsync -av --delete --exclude-from=- $source/ $target") @@ -91,8 +95,13 @@ sub addTargetToNfsExports my $self = shift; my $target = shift; - my $exports = slurpFile("/etc/exports"); -print "$exports\n"; + 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,root_squash,sync,no_subtree_check)"); + print (('#' x 80)."\n"); + +# TODO : add something a bit more clever here... +# my $exports = slurpFile("/etc/exports"); } 1; diff --git a/installer/slxos-export b/installer/slxos-export index 9b179e53..f256110b 100755 --- a/installer/slxos-export +++ b/installer/slxos-export @@ -73,7 +73,7 @@ chdir($FindBin::RealBin) or die _tr("can't chdir to script-path <%> (%s)", $FindBin::RealBin, $!); -# create ossetup-engine for given distro and start it: +# create OSExport-engine for given export type and start it: my $engine = OpenSLX::OSExport::Engine->new; $engine->initialize($vendorOSName, $exportType); if (!-e $engine->{'vendor-os-path'}) { @@ -109,28 +109,13 @@ slxos-export [options] <vendor-os-name> <export-type> Prints a brief help message and exits. -=item B<--man> - -Prints the manual page and exits. - -=item B<--selection=<string>> +=item B<--list> -Many distributions offer several different package selections for -installation. With this option you can specify which of these you -would like to use. +Lists all supported export types and exits. -If you pass an unknown selection, you will see a list of the selections -that are available. - -In clone-mode, the selection specifies the name by which the cloned system -will be known (exact name will be '<distro>-<selection>' instead of -'<distro>-cloned-from-<rsync-source>'). - -=item B<--source=<string>> +=item B<--man> -When cloning a vendor-OS, slxos-export needs to know where to fetch -the existing OS-files from. You can specify the rsync-uri with this -option. +Prints the manual page and exits. =item B<--version> |