filesystems: revert removable partitions check using udisks because unavailable because is relies on dbus which is started after postplug; filter blkid output with /dev/sd to prevent other kind of devices to be checked

This commit is contained in:
Silvan Calarco 2012-01-07 13:59:29 +01:00
parent 2da950c727
commit 555840e2c0

View File

@ -161,7 +161,7 @@ let "swapon = 0"
[[ "$FS_PARTS_MOUNT" = "yes" ]] && AUTO_ADD="" || AUTO_ADD="noauto,"
[[ "$FS_PARTS_UPDATE" = no && "$FS_SWAP_UPDATE" = no ]] ||
blkid | while read line; do
blkid | grep /dev/sd | while read line; do
unset dev uuid devline devfstype TYPE UUID LABEL
dev=${line/:*}
@ -173,7 +173,8 @@ blkid | while read line; do
[ "$label" ] || label="disk"
if [ -e $dev ]; then
# skip removable partitions
[ "`udisks --show-info $dev | grep 'system internal:[[:space:]]*0$'`" ] && {
[ "`cat /sys/block/${dev:5:3}/removable 2>/dev/null`" = "1" \
-a ! -e /sys/block/${dev:5:3}/device/unload_heads ] && {
[ "$DEBUG" ] && logmsg "$me" $"skipped device $dev ($uuid): removable"
continue;
}