From 71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Fri, 23 Oct 2009 17:26:38 +0000 Subject: 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 --- os-plugins/plugins/vmware/XX_vmware.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'os-plugins/plugins/vmware/XX_vmware.sh') 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 -- cgit v1.2.3-55-g7522