Skip to content

Commit

Permalink
Adding proper code comments about vol_id removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-baumann committed Mar 15, 2010
1 parent 8bf665e commit 12d7375
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions scripts/live-bottom/12fstab
Expand Up @@ -66,10 +66,13 @@ then
continue
fi

# udev (>= 146) no longer provides vol_id
if [ -x /lib/udev/vol_id ]
then
# lenny
/lib/udev/vol_id ${device%%[0-9]*} 2>/dev/null | grep -q "^ID_FS_USAGE=raid" && continue
else
# squeeze
/sbin/blkid -o udev -p ${device%%[0-9]*} | grep -q "^ID_FS_USAGE=raid" && continue
fi

Expand Down
8 changes: 6 additions & 2 deletions scripts/live-helpers
Expand Up @@ -76,11 +76,13 @@ is_supported_fs ()

get_fstype ()
{
# udev >=146-1 no longer provides vol_id:
# udev (>= 146) no longer provides vol_id
if [ -x /lib/udev/vol_id ]
then
# lenny
/lib/udev/vol_id -t ${1} 2>/dev/null
else
# squeeze
/sbin/blkid -s TYPE -o value $1 2>/dev/null
fi
}
Expand Down Expand Up @@ -339,15 +341,17 @@ find_cow_device ()
done
fi

# udev >=146-1 no longer provides vol_id:
# udev (>= 146) no longer provides vol_id
if [ -x /lib/udev/vol_id ]
then
# lenny
if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
then
echo "${devname}"
return 0
fi
else
# squeeze
if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ]
then
echo "${devname}"
Expand Down

0 comments on commit 12d7375

Please sign in to comment.