Skip to content

Commit

Permalink
Fix for wrong parsing of blkid output
Browse files Browse the repository at this point in the history
  • Loading branch information
Dario Berzano committed May 9, 2014
1 parent e076fa3 commit fa25d9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hepix/extra/hepix_functions
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit fa25d9f

Please sign in to comment.