summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/XX_vmware.sh
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/XX_vmware.sh
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/XX_vmware.sh')
-rw-r--r--os-plugins/plugins/vmware/XX_vmware.sh13
1 files changed, 9 insertions, 4 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