From 1359e74db27cda91bcf02b608ac1ec49bf5d2a35 Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 7 Jul 2011 16:27:24 +0200 Subject: Fixes for the emufe plugin ... --- src/os-plugins/plugins/emufe/XX_emufe.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/os-plugins') diff --git a/src/os-plugins/plugins/emufe/XX_emufe.sh b/src/os-plugins/plugins/emufe/XX_emufe.sh index 7977e246..d7b45dab 100644 --- a/src/os-plugins/plugins/emufe/XX_emufe.sh +++ b/src/os-plugins/plugins/emufe/XX_emufe.sh @@ -15,6 +15,8 @@ # include default directories . /etc/openslx.conf +VIRTDIR=/mnt/${OPENSLX_DEFAULT_VIRTDIR} + # check if the configuration file is available if [ -e ${CONFFILE} ]; then @@ -30,7 +32,27 @@ if [ -e ${CONFFILE} ]; then testmkd ${PLUGINCONFDIR} cp /mnt/${PLUGINDIR}/run-virt.include ${PLUGINCONFDIR} cp ${CONFFILE} ${PLUGINCONFDIR} + fi + + ############################################################################ + # emulator stuff provisioning: two scenarios + # * VM images in /usr/share/emufe - then simply link + # * VM images via additional mount (mount source NFS, NBD, ...) + # get source of emufe image server (get type, server and path) + if strinstr "/" "${emufe_imagesrc}" ; then + vmimgprot=$(uri_token ${emufe_imagesrc} prot) + vmimgserv=$(uri_token ${emufe_imagesrc} server) + vmimgpath="$(uri_token ${emufe_imagesrc} path)" + fi + if [ -n "${vmimgserv}" -a -n ${vmimgpath} -a -n ${vmimgprot} ] ; then + mnttarget=${VIRTDIR}/emulation + # mount the emufe image source readonly (ro) + fsmount ${vmimgprot} ${vmimgserv} ${vmimgpath} ${mnttarget} ro + else + [ $DEBUGLEVEL -gt 1 ] && error " * Incomplete information in variable \ +${emufe_imagesrc}." nonfatal + fi else [ $DEBUGLEVEL -gt 0 ] && echo " * Configuration of 'emufe' plugin failed" fi -- cgit v1.2.3-55-g7522