summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware
diff options
context:
space:
mode:
authorMichael Janczyk2009-10-23 19:26:38 +0200
committerMichael Janczyk2009-10-23 19:26:38 +0200
commit71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6 (patch)
tree7a67be8cbd836335409353bf1c6de05f7047f038 /os-plugins/plugins/vmware
parentmoving tested theming stuff to 5.0 (diff)
downloadcore-71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6.tar.gz
core-71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6.tar.xz
core-71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6.zip
default directories introduced. please test and say what you think. examples see plugins vmware and vmchooser. can be simplyfied further (VIRTDIR, ETC...). /opt/openslx can bu user for plugins, ect as well (maybe PLUGINDIR?).
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3177 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware')
-rw-r--r--os-plugins/plugins/vmware/XX_vmware.sh13
-rw-r--r--os-plugins/plugins/vmware/files/run-virt.include9
2 files changed, 13 insertions, 9 deletions
diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh
index 5068c0f6..34bb8067 100644
--- a/os-plugins/plugins/vmware/XX_vmware.sh
+++ b/os-plugins/plugins/vmware/XX_vmware.sh
@@ -16,6 +16,12 @@
# write /etc/vmware/config (if a non-standard location of vmware basedir is
# to be configured), /etc/init.d/vmware
+# include default directories
+. /etc/openslx.conf
+
+ETCDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR}
+VIRTDIR=/mnt/${OPENSLX_DEFAULT_VIRTDIR}
+
# check if the configuration file is available
if [ -e /initramfs/plugin-conf/vmware.conf ]; then
@@ -154,7 +160,7 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \
vmimgpath="$(uri_token ${vmware_imagesrc} path)"
fi
if [ -n "${vmimgserv}" -a -n ${vmimgpath} -a -n ${vmimgprot} ] ; then
- mnttarget=/mnt/var/lib/virt/vmware
+ mnttarget=${VIRTDIR}/vmware
# mount the vmware image source readonly (ro)
fsmount ${vmimgprot} ${vmimgserv} ${vmimgpath} ${mnttarget} ro
else
@@ -196,12 +202,11 @@ prefvmx.useRecommendedLockedMemSize = "TRUE"' | sed -e "s/^ *//" \
# copy version depending files - the vmchooser expects for every virtua-
# lization plugin a file named after it (here run-vmware.include)
- testmkd /mnt/etc/opt/openslx
cp /mnt/opt/openslx/plugin-repo/vmware/run-virt.include \
- /mnt/etc/opt/openslx/run-vmware.include
+ ${ETCDIR}/run-vmware.include
# copy version depending files
cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmplayer \
- /mnt/var/X11R6/bin/vmplayer
+ /mnt/var/X11R6/bin/vmplayer
if [ -e /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmware ]; then
cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmware \
/mnt/var/X11R6/bin/vmware
diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include
index 725ccb1c..a148442c 100644
--- a/os-plugins/plugins/vmware/files/run-virt.include
+++ b/os-plugins/plugins/vmware/files/run-virt.include
@@ -15,6 +15,8 @@
# - component for vmware/player of the vmchooser plugin run-virt.sh
# -----------------------------------------------------------------------------
+# include default directories
+. /etc/opt/openslx/openslx.conf
# include general configuration from vmchooser
. /etc/opt/openslx/run-virt.include
@@ -211,6 +213,8 @@ confdir=${redodir}
conffile="${confdir}/run-vmware.conf"
# users vmware config folder
vmhome="${HOME}/.vmware"
+# logfile
+logfile=${OPENSLX_DEFAULT_LOGDIR}/run-vmware.${USER}.$$.log
# get several version infos for vmware/player
. /etc/vmware/slxvmconfig
@@ -376,11 +380,6 @@ done
# logging and stdout
################################################################################
-logfile=${vmhome}/run-vmware.`hostname`.log
-
-# remove ols logs
-rm ${vmhome}/run-vmware.* >/dev/null 2>&1
-
# function to write to stdout and logfile
writelog ()
{