From fa25d9f0e1697b1875c89a775c42ebd524c632a7 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Fri, 9 May 2014 19:54:07 +0200 Subject: [PATCH] Fix for wrong parsing of blkid output --- hepix/extra/hepix_functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hepix/extra/hepix_functions b/hepix/extra/hepix_functions index 36951d9..0be20ef 100644 --- a/hepix/extra/hepix_functions +++ b/hepix/extra/hepix_functions @@ -86,7 +86,11 @@ getResourcesFromCD() { for dev in /dev/sr{0,1} /dev/{xv,v,h,s}d{c,d,b}{,1}; do if [ -e "${dev}" ] ; then rdisk=$dev - fstype=$(blkid $rdisk | awk '{print $4}' | sed s/TYPE=// | tr -d \") + + # Extract filesystem type of device + fstype=$( blkid $rdisk | grep -o -E 'TYPE="[0-9a-zA-Z]+' ) + fstype=${fstype:6} + if [ "x$fstype" = "xiso9660" -o "x$fstype" = "xvfat" ]; then logger -t $0 "Attempting to mount contextualization image from $rdisk"