From 42f9d2f6031f8d325037dbfd640b92e5eb48809e Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Thu, 19 Feb 2009 00:15:59 +0000 Subject: Next set of fixes and cleanups ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2613 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 46 ++++++---------------- os-plugins/plugins/vmware/XX_vmware.sh | 9 +++-- 2 files changed, 16 insertions(+), 39 deletions(-) (limited to 'os-plugins/plugins/vmware') diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index d4af8f0a..82015534 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -464,7 +464,7 @@ sub _writeVmwareConfigs { %versionhash = _getVersion($vmpath); $config .= "version=\"".$versionhash{vmversion}."\"\n"; - $config .= "buildversion=\"".$versionhash{vmbuildversion}."\""; + $config .= "buildversion=\"".$versionhash{vmbuildversion}."\"\n"; spitFile("$self->{'pluginRepositoryPath'}/$kind/slxvmconfig", $config); chmod 0755, "$self->{'pluginRepositoryPath'}/$kind/slxvmconfig"; @@ -542,19 +542,8 @@ sub _localInstallation foreach my $file (@files) { copyFile("$pluginFilesPath/$file", "$installationPath"); } - # copy depends on version and rename it to runvmware, saves one check in stage3 - if ($vmversion eq "1.0" || $vmversion eq "5.5") { - print "\n\nDEBUG: player version $vmversion, we use -v1\n\n"; - copyFile("$pluginFilesPath/runvmware-player-v1", "$installationPath", "runvmware"); - } elsif ($vmversion eq "2.0" || $vmversion eq "6.0") { - print "\n\nDEBUG: player version $vmversion, we use -v2\n\n"; - copyFile("$pluginFilesPath/runvmware-player-v2", "$installationPath", "runvmware"); - } elsif ($vmversion eq "2.5" || $vmversion eq "6.5") { - print "\n\nDEBUG: player version $vmversion, we use -v25\n\n"; - copyFile("$pluginFilesPath/runvmware-player-v25", "$installationPath", "runvmware"); - } - ## Create runlevel script -> to be fixed!! + # Create runlevel script -> to be fixed!! my $runlevelScript = "$self->{'pluginRepositoryPath'}/$kind/vmware.init"; if ($vmversion eq "2.5") { $self->_writeRunlevelScript($vmbin, $runlevelScript, "local25"); @@ -562,7 +551,7 @@ sub _localInstallation $self->_writeRunlevelScript($vmbin, $runlevelScript, $kind); } - ## Create wrapperscripts + # Create wrapper scripts if (-e "/usr/bin/vmware") { $self->_writeWrapperScript("$vmpath", "$kind", "ws") } else { @@ -632,9 +621,6 @@ sub _vmpl25Installation { mkpath($installationPath); - ## - ## Copy needed files - # copy 'normal' needed files my @files = qw( nvram.5.0 install-vmpl.sh ); foreach my $file (@files) { @@ -644,21 +630,17 @@ sub _vmpl25Installation { # copy on depending runvmware file copyFile("$pluginFilesPath/runvmware-player-v25", "$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 + # Creating needed config /etc/vmware/config $self->_writeVmwareConfigs("$kind", "$vmpath"); } @@ -678,9 +660,6 @@ sub _vmpl1Installation { mkpath($installationPath); - ## - ## Copy needed files - # copy 'normal' needed files my @files = qw( nvram.5.0 install-vmpl.sh ); foreach my $file (@files) { @@ -689,20 +668,17 @@ sub _vmpl1Installation { # copy on depending runvmware file copyFile("$pluginFilesPath/runvmware-player-v1", "$installationPath", "runvmware"); - ## - ## Download and install the binarys + # Download and install the binarys 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 wrapper scripts $self->_writeWrapperScript("$vmpath", "$kind", "player"); - ## Creating needed config /etc/vmware/config + # creating needed config /etc/vmware/config $self->_writeVmwareConfigs("$kind", "$vmpath"); } diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh index 190f2322..4dab751c 100644 --- a/os-plugins/plugins/vmware/XX_vmware.sh +++ b/os-plugins/plugins/vmware/XX_vmware.sh @@ -226,11 +226,12 @@ prefvmx.useRecommendedLockedMemSize = "TRUE"' | sed -e "s/^ *//" \ # affects only kernel and config depending configuration of not # local installed versions - cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/config \ - /mnt/etc/vmware/config + cat /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/config \ + >>/mnt/etc/vmware/config chmod 644 /mnt/etc/vmware/config - echo "# stage1 variables" >>/mnt/etc/vmware/slxvmconfig - cat /mnt/opt/openslx/plugin-repo/vmware/slxvmconfig \ + echo "# stage1 variables produced during plugin install" \ + >>/mnt/etc/vmware/slxvmconfig + cat /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/slxvmconfig \ >>/mnt/etc/vmware/slxvmconfig [ $DEBUGLEVEL -gt 0 ] && echo "done with 'vmware' os-plugin ..." -- cgit v1.2.3-55-g7522