From 61a357c17f19e56c1fdbd8b0f51339bdd52f2d5a Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 18 Feb 2009 23:32:30 +0000 Subject: More fixes for run-virt.sh environment ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2611 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) (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 9835bb33..d4af8f0a 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -452,20 +452,23 @@ sub _writeWrapperScript } } -sub _writeVmwareConfig { +sub _writeVmwareConfigs { my $self = shift; my $kind = shift; my $vmpath = shift; my %versionhash = (vmversion => "", vmbuildversion => ""); my $vmversion = ""; my $vmbuildversion = ""; - my $config = "libdir=\"$vmpath\"\n"; + my $config = ""; %versionhash = _getVersion($vmpath); $config .= "version=\"".$versionhash{vmversion}."\"\n"; $config .= "buildversion=\"".$versionhash{vmbuildversion}."\""; + spitFile("$self->{'pluginRepositoryPath'}/$kind/slxvmconfig", $config); + chmod 0755, "$self->{'pluginRepositoryPath'}/$kind/slxvmconfig"; + $config = "libdir = \"$vmpath\"\n"; spitFile("$self->{'pluginRepositoryPath'}/$kind/config", $config); chmod 0755, "$self->{'pluginRepositoryPath'}/$kind/config"; } @@ -570,7 +573,7 @@ sub _localInstallation # else { TODO: errorhandling } ## Creating needed config /etc/vmware/config - $self->_writeVmwareConfig("$kind", "$vmpath"); + $self->_writeVmwareConfigs("$kind", "$vmpath"); } @@ -599,22 +602,18 @@ sub _vmpl2Installation { # copy on depending runvmware file copyFile("$pluginFilesPath/runvmware-player-v2", "$installationPath", "runvmware"); - ## - ## Install the binarys from given pkgpath + # Install the binarys from given pkgpath system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/$kind/install-vmpl.sh $kind"); - ## - ## Create runlevel script + # Create runlevel script my $runlevelScript = "$self->{'pluginRepositoryPath'}/$kind/vmware.init"; $self->_writeRunlevelScript($vmbin, $runlevelScript, $kind); - ## - ## Create wrapperscripts + # Create wrapperscripts $self->_writeWrapperScript("$vmpath", "$kind", "player"); - ## - ## Creating needed config /etc/vmware/config - $self->_writeVmwareConfig("$kind", "$vmpath"); + # Creating needed config /etc/vmware/config + $self->_writeVmwareConfigs("$kind", "$vmpath"); } @@ -660,11 +659,10 @@ sub _vmpl25Installation { ## ## Creating needed config /etc/vmware/config - $self->_writeVmwareConfig("$kind", "$vmpath"); + $self->_writeVmwareConfigs("$kind", "$vmpath"); } - sub _vmpl1Installation { my $self = shift; @@ -704,9 +702,8 @@ sub _vmpl1Installation { ## Create wrapperscripts $self->_writeWrapperScript("$vmpath", "$kind", "player"); - ## ## Creating needed config /etc/vmware/config - $self->_writeVmwareConfig("$kind", "$vmpath"); + $self->_writeVmwareConfigs("$kind", "$vmpath"); } -- cgit v1.2.3-55-g7522