From 0e55413d380ff99b40b64719c9288d072a613d4c Mon Sep 17 00:00:00 2001 From: Volker Uhrig Date: Wed, 14 May 2008 17:56:08 +0000 Subject: * Added usage of stage1 attributes * small modification in stage3 * Missing * some more error checks and runvmware enhancements (would work without it) * vmware<->vmchooser integration in runvmware or wrapper * test of vmware_kind=local with workstation * vmplayer works with vmware_kind=local * more vmware_kinds * Missing in vmware_kind=vmpl2.0 integration * no kernel modules installed and loaded yet (but are compiled) * test of vmware_kind=vmpl2.0 on test based fixes git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1769 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 73 ++++------------------ os-plugins/plugins/vmware/XX_vmware.sh | 32 +++------- 2 files changed, 19 insertions(+), 86 deletions(-) diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index ca712b15..ead16365 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -139,12 +139,11 @@ sub getAttrInfo }, ## ## only stage1 setup options: different kinds to setup - ## TODO: write a list and check it in stage3 'vmware::local' => { applies_to_vendor_os => 1, applies_to_system => 0, applies_to_clients => 0, - description => unshiftHereDoc(<<' End-of-Here'), + description => unshiftHereDoc(<<' End-of-Here'), Set's up stage1 configuration for a local installed vmplayer or vmware workstation End-of-Here @@ -156,7 +155,7 @@ sub getAttrInfo applies_to_vendor_os => 1, applies_to_system => 0, applies_to_clients => 0, - description => unshiftHereDoc(<<' End-of-Here'), + description => unshiftHereDoc(<<' End-of-Here'), Install and configure vmplayer v2 End-of-Here content_regex => qr{^(1|0)$}, @@ -178,65 +177,17 @@ sub installationPhase $self->{pluginTempPath} = shift; $self->{openslxPath} = shift; $self->{attrs} = shift; + - # install requested packages by **/ or triggered by 'vmware::kind' - # check solution in "desktop plugin" - - # generate the runlevel scripts for all existing vmware installations, - # variants because we do not know which on is selected on client level - # in stage3 (we know the installed packages from ** / 'vmware::kind' - # (code depends on distro/version and vmware location) - # 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 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"; - #$vmversion = "TODO: get information from the stage1 flag"; - #$vmfile = "TODO: get information from the stage1 flag"; - } - - - - # TODO: check how we can put the vmversion information to stage3. - # more or less only needed for local installation but can - # also be used for quickswitch of vmware version in stage4 - - # rather theoretical option for now - who should run the root scripts!? - # (if it is requested later on, this feature might be added, but not relevant now) - # Perhaps we write all installed player versions in this file - # which get sourced by XX_vmware.sh - - # Conflict without rewrite of this code: local installed - # vmware/player or(!) vmplayer - # Solution: substitude "foreach my $type (@types) {" - # with _checkInstalled(local_vmplayer); - # _checkInstalled(local_vmwarews); - # _checkInstalled(vmplayer1); - # _checkInstalled(vmplayer2); - # and so on - # while _checkInstalled pseudocode - # sub _checkInstalled($type, $path) { - # check_for_version(see above) - # write information of this version to file - # } - # => results in conflict of local, we just have - # local defined but would need then a - # local_ws and local_player which is less userfriendly - # Dirk: see .4.2 suse-10.2-(test|main) system which includes - # vmplayer or vmware ws/player (vmplayer is every time a part of the - # workstation!! since version 5.5!! So if we have workstation, than - # we have automatically vmplayer too) - + # kinds we will configure and install + # TODO: write a list of installed/setted up and check it in stage3 + # this will avoid conflict of configured vmware version in + # stage3 which are not setted up or installed in stage1 + if ($self->{attrs}->{'vmware::local'} == 1) { + $self->_localInstallation(); + } + if ($self->{attrs}->{'vmware::vmpl2.0'} == 1) { + $self->_vmpl2Installation(); } } diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh index d3d47547..dd5913c5 100644 --- a/os-plugins/plugins/vmware/XX_vmware.sh +++ b/os-plugins/plugins/vmware/XX_vmware.sh @@ -236,7 +236,8 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \ # TODO: isn't boot.slx dead/not functional due of missing ";; esac"? echo -e "\tmount -t usbfs usbfs /proc/bus/usb 2>/dev/null" \ >>/mnt/etc/${D_INITDIR}/boot.slx - + + # TODO: perhaps we can a) kick out vmdir # b) configure vmdir by plugin configuration # TODO: How to start it. See Wiki. Currently a) implemnted @@ -247,31 +248,12 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \ ## ## Copy version depending files - - if [ "${vmware_kind}" = "local" ]; then - - # we know which version from stage1. in stage1 we copy the - # specific file - cp /mnt/opt/openslx/plugin-repo/vmware/local/runvmware \ - /mnt/var/X11R6/bin/run-vmware.sh - - # TODO: Pseudocode2 as notes - # if [ not vmware_kind = local but vmplayer-2.0 ]; then - # should be just the same as filling the /etc/vmware directory with the proper files for general - # vmware operation! - - # possibilities: - # 1. copy needed files depending on the /initramfs/.../vmware.conf - # information. this way we also now the version - # 2. copy needed files depending on the information like in - # pseudocode1, there we will have then a list of all available - # kinds and version. in the far future we could use this - # informations to do a quickswitch in stage5 - # 3. we just copy the depending runvmware file in its own $kind folder - # cost use a few bytes, but takes less time in stage3 - # fi + cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/runvmware \ + /mnt/var/X11R6/bin/run-vmware.sh + if [ "${vmware_kind}" = "vmpl2.0" ]; then + # TODO: setup up kernel files fi - + [ $DEBUGLEVEL -gt 0 ] && echo " * done with 'vmware' os-plugin ..." fi -- cgit v1.2.3-55-g7522