diff options
author | Volker Uhrig | 2008-07-05 20:58:59 +0200 |
---|---|---|
committer | Volker Uhrig | 2008-07-05 20:58:59 +0200 |
commit | 13e84ec837ebf22233391aee93546bc72094357a (patch) | |
tree | 615c5d0ec296f0f64243f25d14c64bf35315210f /os-plugins/plugins/vmware/files/install-vmpl.sh | |
parent | * Minor fix, to make bug hunting easier (diff) | |
download | core-13e84ec837ebf22233391aee93546bc72094357a.tar.gz core-13e84ec837ebf22233391aee93546bc72094357a.tar.xz core-13e84ec837ebf22233391aee93546bc72094357a.zip |
* rewrite for vmpl1.0. tested on suse-10.2 with success
* asks now if a installed vmplX.0 player should be reinstalled
* writes now player version into /etc/vmware/version
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1904 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware/files/install-vmpl.sh')
-rw-r--r-- | os-plugins/plugins/vmware/files/install-vmpl.sh | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/os-plugins/plugins/vmware/files/install-vmpl.sh b/os-plugins/plugins/vmware/files/install-vmpl.sh index d2b89004..86ffb7a0 100644 --- a/os-plugins/plugins/vmware/files/install-vmpl.sh +++ b/os-plugins/plugins/vmware/files/install-vmpl.sh @@ -1,9 +1,23 @@ #!/bin/sh +### Check if player are still installed +if [ -d /opt/openslx/plugin-repo/vmware/$1/vmroot ]; then + echo " * $1 seems to be installed. There shouldn't be a need for a new installation." + echo " If you want to reinstall $1 press \"y\" else we will exit" + read + if [ "${REPLY}" != "y" ]; then + echo " * $1 is already installed. Nothing to do." + exit + fi + echo " * $1 will be reinstalled" +fi + + +### Now define values if [ "$1" == "vmpl1.0" ]; then vmplversion="vmpl1.0" - url=http://download3.vmware.com/software/vmplayer/VMware-player-2.0.4-93057.i386.tar.gz - tgzfile=VMware-player-2.0.4-93057.i386.tar.gz + url=http://download3.vmware.com/software/vmplayer/VMware-player-1.0.7-91707.tar.gz + tgzfile=VMware-player-1.0.7-91707.tar.gz else if [ "$1" == "vmpl2.0" ]; then vmplversion="vmpl2.0" url=http://download3.vmware.com/software/vmplayer/VMware-player-2.0.4-93057.i386.tar.gz @@ -11,6 +25,11 @@ else if [ "$1" == "vmpl2.0" ]; then fi fi + +### Give informations about the EULA +echo "" +echo "EULA information for $vmplversion" +echo "" 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 ..." @@ -25,6 +44,8 @@ echo read echo + +### EULA information passed, install depending player now if [ "${REPLY}" == "YES" ]; then echo " * Downloading vmplayer as ${vmplversion} now. This may take a while" @@ -44,7 +65,9 @@ if [ "${REPLY}" == "YES" ]; then mkdir -p vmroot/lib mv vmware-player-distrib/lib vmroot/lib/vmware mv vmware-player-distrib/bin vmroot/ - mv vmware-player-distrib/sbin vmroot/ + if [ "${vmplversion}" != "vmpl1.0" ]; then + mv vmware-player-distrib/sbin vmroot/ + fi mv vmware-player-distrib/doc vmroot/ rm -rf vmware-player-distrib/ @@ -82,19 +105,24 @@ if [ "${REPLY}" == "YES" ]; then cd vmroot/lib/vmware/modules/source tar xf vmnet.tar tar xf vmmon.tar - tar xf vmblock.tar + if [ "${vmplversion}" != "vmpl1.0" ]; then + tar xf vmblock.tar + fi 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 - cp vmblock.ko vmblock.o ../../../../../modules - cd .. + #TODO: vmblock only v2 + if [ "${vmplversion}" != "vmpl1.0" ]; then + cd vmblock-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 + cp vmblock.ko vmblock.o ../../../../../modules + cd .. + fi echo " * building vmmon module" cd vmmon-only @@ -113,10 +141,6 @@ if [ "${REPLY}" == "YES" ]; then echo " * setting up EULA" mv vmroot/doc/EULA vmroot/lib/vmware/share/EULA.txt - # TODO: remove. just for debug reasons - #echo "Press any return to process" - #read - echo " * finishing installation" else |