From 18cbb94a0c1352967b8e90b487d1d1ef0c78c1db Mon Sep 17 00:00:00 2001 From: Volker Uhrig Date: Thu, 7 Aug 2008 22:57:25 +0000 Subject: * copy a directory with vmware binarys from the server system to stage1 via preInstallationPhase() while using slxos-plugin install vendorOS vmware vmware::vmpl1.0=1 vmware::pkgpath=/path/to/tgz * EULA Information at installation got removed * No automatic download anymore git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1989 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 43 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm') diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index 0014a04b..b24d9386 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -179,6 +179,18 @@ sub getAttrInfo content_descr => '1 means active - 0 means inactive', default => '0', }, + 'vmware::pkgpath' => { + applies_to_vendor_os => 1, + applies_to_system => 0, + applies_to_clients => 0, + description => unshiftHereDoc(<<' End-of-Here'), + Path to VMware packages + End-of-Here + #TODO + #content_regex => qr{^(1|0)$}, + content_descr => '1 means active - 0 means inactive', + default => '0', + }, # ** set of attributes for the installation of VM Workstation/Player # versions. More than one package could be installed in parallel. # To be matched to/triggerd by 'vmware::kind' @@ -186,6 +198,34 @@ sub getAttrInfo } +sub preInstallationPhase() +{ + my $self = shift; + my $info = shift; + + $self->{pluginRepositoryPath} = $info->{'plugin-repo-path'}; + $self->{pluginTempPath} = $info->{'plugin-temp-path'}; + $self->{openslxBasePath} = $info->{'openslx-base-path'}; + $self->{openslxConfigPath} = $info->{'openslx-config-path'}; + $self->{attrs} = $info->{'plugin-attrs'}; + $self->{vendorOsPath} = $info->{'vendor-os-path'}; + + my $pkgpath = $self->{attrs}->{'vmware::pkgpath'}; + + if (! -d $pkgpath) { + print "\n\npkgpath: no such directory!\n\n"; + exit 1; + } + + # todo: ask oliver about a similiar function + # like copyFile() just for directorys + # or fix the manual after checked the source of + # copyFile() function. check if copyFile etc. perldoc + # is somewhere in the wiki documented else do it! + system("cp -r $pkgpath $self->{pluginRepositoryPath}/packages"); +} + + sub installationPhase { my $self = shift; @@ -505,11 +545,12 @@ sub _vmpl2Installation { foreach my $file (@files) { copyFile("$pluginFilesPath/$file", "$installationPath"); } + # copy on depending runvmware file copyFile("$pluginFilesPath/runvmware-player-v2", "$installationPath", "runvmware"); ## - ## Download and install the binarys + ## Install the binarys from given pkgpath system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/$kind/install-vmpl.sh $kind"); ## -- cgit v1.2.3-55-g7522