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:
parent
2da950c727
commit
555840e2c0
@ -161,7 +161,7 @@ let "swapon = 0"
|
|||||||
[[ "$FS_PARTS_MOUNT" = "yes" ]] && AUTO_ADD="" || AUTO_ADD="noauto,"
|
[[ "$FS_PARTS_MOUNT" = "yes" ]] && AUTO_ADD="" || AUTO_ADD="noauto,"
|
||||||
|
|
||||||
[[ "$FS_PARTS_UPDATE" = no && "$FS_SWAP_UPDATE" = no ]] ||
|
[[ "$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
|
unset dev uuid devline devfstype TYPE UUID LABEL
|
||||||
dev=${line/:*}
|
dev=${line/:*}
|
||||||
@ -173,7 +173,8 @@ blkid | while read line; do
|
|||||||
[ "$label" ] || label="disk"
|
[ "$label" ] || label="disk"
|
||||||
if [ -e $dev ]; then
|
if [ -e $dev ]; then
|
||||||
# skip removable partitions
|
# 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"
|
[ "$DEBUG" ] && logmsg "$me" $"skipped device $dev ($uuid): removable"
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user