X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=5a250405cff26fd958822d875bd3433bb3e8592d;hp=42c03bdf596ef47a98f7ae0a5b3b4da474e5019d;hb=122114fc5d2828993afc44c17b5c5f5069b44cff;hpb=6c265c82405767eccb349f3cf14d432c5dd5b35f diff --git a/autoconfig.functions b/autoconfig.functions index 42c03bd..5a25040 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1512,6 +1512,17 @@ else fi fi DCSDEVICE=$(blkid -t LABEL=$GRMLCFG | head -1 | awk -F: '{print $1}') + + modprobe 9p 2>/dev/null || true + if [ -z "$DCSDEVICE" ] && grep -q 9p /proc/filesystems ; then + if grep -q "$GRMLCFG" /sys/bus/virtio/devices/*/mount_tag 2>/dev/null ; then + einfo "Found 9p-virtio fs with mount_tag $GRMLCFG" + DCSDEVICE="$GRMLCFG" + MOUNTOPTIONS="ro,trans=virtio" + DCSFS="9p" + fi + fi + if [ -n "$DCSDEVICE" ]; then DCSMP="/mnt/grmlcfg" fi @@ -1530,7 +1541,7 @@ else else [ -d $DCSMP ] || mkdir $DCSMP umount $DCSMP >>$DEBUG 2>&1 # make sure it is not mounted - mount -o ro -t auto $DCSDEVICE $DCSMP ; RC="$?" + mount -o ${MOUNTOPTIONS:-ro} -t ${DCSFS:-auto} $DCSDEVICE $DCSMP ; RC="$?" if [[ $RC == 0 ]]; then einfo "Successfully mounted $DCSDEVICE to $DCSMP (readonly)." ; eend 0 else