diff options
author | Volker Uhrig | 2008-05-14 17:46:18 +0200 |
---|---|---|
committer | Volker Uhrig | 2008-05-14 17:46:18 +0200 |
commit | 87dadc59fc53557acfa70092ad5e71fb790dda03 (patch) | |
tree | 352dcc7c29b935a94973b56fd977972b9e5312b1 /os-plugins/plugins/vmware | |
parent | * removed files not needed anymore (diff) | |
download | core-87dadc59fc53557acfa70092ad5e71fb790dda03.tar.gz core-87dadc59fc53557acfa70092ad5e71fb790dda03.tar.xz core-87dadc59fc53557acfa70092ad5e71fb790dda03.zip |
* added installation of vmplayer 2
* added installation in stage1
* configuration and setup in stage3 and stage4 not done yet!
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1766 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware')
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 49 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/files/README | 2 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/files/install-vmpl2.0.sh | 78 |
3 files changed, 128 insertions, 1 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index 031a4566..327a7af5 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -162,13 +162,16 @@ sub installationPhase # for local ... and other vm-installations # TODO: generate the list from ** / 'vmware::kind' (stage1 attributes) # (do not generate scripts for packages which are not installed) - my @types = qw( local ); + my @types = qw( local vmpl2.0 ); foreach my $type (@types) { # location of the vmware stuff if ($type eq "local") { $self->_localInstallation(); } # TODO: here we will add the slx-installed versions + elsif ($type eq "vmpl2.0") { + $self->_vmpl2Installation(); + } else { #my $vmpath = "$self->{'pluginRepositoryPath'}/vmware/$type"; #my $vmbin = "$vmpath/bin"; @@ -400,6 +403,50 @@ sub _localInstallation } +sub _vmpl2Installation { + my $self = shift; + + my $kind = "vmpl2.0"; + my $vmpath = "/opt/openslx/plugin-repo/vmware/$kind/root/lib/vmware"; + my $vmbin = "/opt/openslx/plugin-repo/vmware/$kind/root/bin"; + my $vmversion = "TODO_we_know_it"; + my $vmbuildversion = "TODO_we_know_it"; + + my $pluginFilesPath + = "$self->{'openslxPath'}/lib/plugins/$self->{'name'}/files"; + my $installationPath = "$self->{'pluginRepositoryPath'}/$kind"; + + mkpath($installationPath); + + + ## + ## Copy needed files + + # copy 'normal' needed files + my @files = qw( nvram.5.0 install-vmpl2.0.sh ); + 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 + system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/$kind/install-$kind.sh"); + + + + ## + ## Create runlevel script + my $runlevelScript = "$self->{'pluginRepositoryPath'}/$kind/vmware.init"; + $self->_writeRunlevelScript($vmbin, $runlevelScript); + + ## + ## Create wrapperscripts + #TODO: change local + $self->_writeWrapperScript("$vmpath", "$kind", "player") + +} 1; diff --git a/os-plugins/plugins/vmware/files/README b/os-plugins/plugins/vmware/files/README index ba51b1a6..f3913288 100644 --- a/os-plugins/plugins/vmware/files/README +++ b/os-plugins/plugins/vmware/files/README @@ -23,3 +23,5 @@ Files This example files shows which VMware features are configureable for each virtual machine. Should be moved sooner or later to the vm-chooser plugin +- install-vmpl2.0.sh + Install script, which will download and install vmplayer v2.0 if choosen diff --git a/os-plugins/plugins/vmware/files/install-vmpl2.0.sh b/os-plugins/plugins/vmware/files/install-vmpl2.0.sh new file mode 100644 index 00000000..d4a6c99f --- /dev/null +++ b/os-plugins/plugins/vmware/files/install-vmpl2.0.sh @@ -0,0 +1,78 @@ +#!/bin/sh + +echo "This script will download and install vmplayer from http://www.vmware.com/" +echo "Please go to http://vmware.com/download/player/player_reg.html" +echo "and ..." +echo " * complete this registration form" +echo " * click on \"Download Now\"" +echo " * read and decide if you want to accept the VMware master end user license agreement" +echo +echo "If you have done this and accepted the enduser licence type in yes in uppercase." +echo "This will install vmplayer on your vendor-os. If you don't agree this license" +echo "vmplayer won't be installed." +echo +read +echo + +if [ "${REPLY}" == "YES" ]; then + + echo " * Downloading vmplayer now. This may take a while" + cd /opt/openslx/plugin-repo/vmware/vmpl2.0 + #TODO: during development we have this file and dont need to download it + #wget -c http://download3.vmware.com/software/vmplayer/VMware-player-2.0.2-59824.i386.tar.gz + + echo " * Unpacking vmplayer" + #tar xfz VMware-player-2.0.2-59824.i386.tar.gz + #TODO: just for developing purpose + tar xfz ../../VMware-player-2.0.2-59824.i386.tar.gz + + echo " * copying files..." + mkdir root + mkdir -p root/lib + mv vmware-player-distrib/lib root/lib/vmware + mv vmware-player-distrib/bin root/ + mv vmware-player-distrib/sbin root/ + mv vmware-player-distrib/doc root/ + rm -rf vmware-player-distrib/ + + echo " * creating /etc/vmware" + mkdir -p /etc/vmware + + echo " * unpacking kernel modules" + cd root/lib/vmware/modules/source + tar xf vmnet.tar + tar xf vmmon.tar + tar xf vmblock.tar + + echo " * building vmblock module" + cd vmblock-only/ + # TODO: check if /boot/vmlinuz is available if we get the kernel version this way + # perhaps we don't need a check... perhaps openslx always use + # /boot/vmlinuz + # This problem happens 3 times. see below! + # TODO: error check if build environment isn't installed... + sed -i "s%^VM_UNAME = .*%VM_UNAME = $(ls /boot/vmlinuz*|grep -v -e "^/boot/vmlinuz$$"|sed 's,/boot/vmlinuz-,,'|sort|tail -n 1)%" Makefile + make -s + cd .. + + echo " * building vmmon module" + cd vmmon-only + sed -i "s%^VM_UNAME = .*%VM_UNAME = $(ls /boot/vmlinuz*|grep -v -e "^/boot/vmlinuz$$"|sed 's,/boot/vmlinuz-,,'|sort|tail -n 1)%" Makefile + make -s + cd .. + + echo " * building vmnet module" + cd vmnet-only + sed -i "s%^VM_UNAME = .*%VM_UNAME = $(ls /boot/vmlinuz*|grep -v -e "^/boot/vmlinuz$$"|sed 's,/boot/vmlinuz-,,'|sort|tail -n 1)%" Makefile + make -s + cd .. + + # TODO: remove. just for debug reasons + echo "Press any return to process" + read + + echo " * finishing installation" + +else + echo "You didnt't accept the end user license. vmplayer is not installed." +fi |