Skip to content

Commit

Permalink
probepart: fix for extended partitions
Browse files Browse the repository at this point in the history
  • Loading branch information
wdlkmpx committed Jan 19, 2017
1 parent 5f538fe commit ae59b22
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions woof-code/rootfs-skeleton/sbin/probepart
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ do
fi
fi

FSTYPE="`blkid /dev/$ONEDEV 2>/dev/null`"
FSTYPE=${FSTYPE##* TYPE=\"} #remove *.TYPE="
FSTYPE=${FSTYPE%%\"*} #remove ".*
[ "$FSTYPE" = "" ] && FSTYPE="unknown"
FSTYPE="$(blkid /dev/$ONEDEV 2>/dev/null | grep -o ' TYPE=.*' | cut -f 2 -d '"')"
if [ "$FSTYPE" = "" ] ; then
[ "$SIZE" = "2" ] && continue #extended partition (most likely)
FSTYPE="unknown"
fi

if [ "$FSTYPE" = "unknown" -a "$OPTICAL" = "yes" ];then # probe optical a bit more.
cddetect -q -d/dev/${ONEDEV} > /dev/null 2>&1
Expand Down

0 comments on commit ae59b22

Please sign in to comment.