summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-02-19 00:32:30 +0100
committerDirk von Suchodoletz2009-02-19 00:32:30 +0100
commit61a357c17f19e56c1fdbd8b0f51339bdd52f2d5a (patch)
treef755883d0cfb85d85c0050456ec81ac53c81a32a
parentbugfix splashy + now /w splashy.shutdown ;) (diff)
downloadcore-61a357c17f19e56c1fdbd8b0f51339bdd52f2d5a.tar.gz
core-61a357c17f19e56c1fdbd8b0f51339bdd52f2d5a.tar.xz
core-61a357c17f19e56c1fdbd8b0f51339bdd52f2d5a.zip
More fixes for run-virt.sh environment ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2611 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm29
-rw-r--r--os-plugins/plugins/vmware/XX_vmware.sh36
-rw-r--r--os-plugins/plugins/vmware/files/run-virt.include16
3 files changed, 21 insertions, 60 deletions
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");
}
diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh
index 6aa520a2..190f2322 100644
--- a/os-plugins/plugins/vmware/XX_vmware.sh
+++ b/os-plugins/plugins/vmware/XX_vmware.sh
@@ -207,10 +207,8 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \
>>/mnt/etc/init.d/boot.slx
# disable VMware swapping
- echo '.encoding = "UTF-8"
- prefvmx.useRecommendedLockedMemSize = "TRUE"
- prefvmx.minVmMemPct = "100"' | \
- sed -e "s/^ *//" \
+ echo -e '.encoding = "UTF-8"\nprefvmx.minVmMemPct = "100"
+prefvmx.useRecommendedLockedMemSize = "TRUE"' | sed -e "s/^ *//" \
>/mnt/etc/vmware/config
# copy version depending files - the vmchooser expects for every virtua-
@@ -226,32 +224,14 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \
/mnt/var/X11R6/bin/vmware
fi
-
# affects only kernel and config depending configuration of not
# local installed versions
- if [ "${vmware_kind}" != "local" ]; then
- cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/config \
- /mnt/etc/vmware
- chmod 644 /mnt/etc/vmware/config
- fi
-
- # write version information for image problem (v2 images don't run
- # on v1 players)
- case ${vmware_kind} in
- "vmpl1.0")
- echo "vmplversion=1" >/mnt/etc/vmware/version
- ;;
- "vmpl2.0")
- echo "vmplversion=2.0" >/mnt/etc/vmware/version
- ;;
- "vmpl2.5")
- echo "vmplversion=2.5" >/mnt/etc/vmware/version
- ;;
- "local*")
- . /mnt/opt/openslx/plugin-repo/vmware/local/versioninfo.txt
- echo "vmplversion=${vmversion}" > /mnt/etc/vmware/version
- ;;
- esac
+ cp /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 \
+ >>/mnt/etc/vmware/slxvmconfig
[ $DEBUGLEVEL -gt 0 ] && echo "done with 'vmware' os-plugin ..."
diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include
index 5afe3692..d384b0b2 100644
--- a/os-plugins/plugins/vmware/files/run-virt.include
+++ b/os-plugins/plugins/vmware/files/run-virt.include
@@ -100,11 +100,6 @@ hver=7
# be found in older version folders too ...)
vmdir="/var/lib/virt/vmware/vmware65"
-# special Variables, persistence vmware?
-#TODO: do we really need it? Should be everywhere nonpersistent
-np=""
-
-
#TODO: check for a faster way, perhaps we should put this into XML
# the grepping under some circumstances lets wait the user for ages ...
if [ $(echo ${imagename} | grep -cv "\-flat.vmdk") ]; then
@@ -389,17 +384,6 @@ writelog "\tDisplayname:\t${displayname}"
# check if image exists, etc...
#filecheck
-# VMPlayer Version.
-# strings is the fastest and most secure way, vmplayer -v takes too much time
-# and resources
-# TODO: fine a faster solution with different installed vmplayer
-# perhaps via stage1 + /etc/vmware/vmversion
-#vmbuild=$(strings /usr/lib/vmware/bin/vmplayer \
-# | grep -m 1 "build-"|sed 's/.*build-//')
-if [ -z ${vmbuild} ]; then
- vmbuild=$(vmplayer -v | sed 's/.*build-//')
-fi
-
### write configuration files ##################################################
# create preferences
preferencesheader