diff options
author | Dirk | 2011-07-07 16:27:24 +0200 |
---|---|---|
committer | Dirk | 2011-07-07 16:27:24 +0200 |
commit | 1359e74db27cda91bcf02b608ac1ec49bf5d2a35 (patch) | |
tree | edbcf93761095cfd80d10a771f5815a54bcda53f /src/os-plugins/plugins/emufe | |
parent | Theme added ... (diff) | |
download | core-1359e74db27cda91bcf02b608ac1ec49bf5d2a35.tar.gz core-1359e74db27cda91bcf02b608ac1ec49bf5d2a35.tar.xz core-1359e74db27cda91bcf02b608ac1ec49bf5d2a35.zip |
Fixes for the emufe plugin ...
Diffstat (limited to 'src/os-plugins/plugins/emufe')
-rw-r--r-- | src/os-plugins/plugins/emufe/XX_emufe.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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 |