filesystems: use udisks instead of sysfs to detect removable (not system-internal) devices
This commit is contained in:
parent
06da04babd
commit
48f4138813
@ -173,8 +173,7 @@ blkid | while read line; do
|
||||
[ "$label" ] || label="disk"
|
||||
if [ -e $dev ]; then
|
||||
# skip removable partitions
|
||||
[ "`cat /sys/block/${dev:5:3}/removable 2>/dev/null`" = "1" \
|
||||
-a ! -e /sys/block/${dev:5:3}/device/unload_heads ] && {
|
||||
udisks --show-info $dev | grep "system internal:[[:space:]]*0$" || {
|
||||
[ "$DEBUG" ] && logmsg "$me" $"skipped device $dev ($uuid): removable"
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user