From 555840e2c0202b8496f9ec0526d983707c38caf2 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 7 Jan 2012 13:59:29 +0100 Subject: [PATCH] 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 --- postplug.d/10filesystems | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/postplug.d/10filesystems b/postplug.d/10filesystems index 0292c68..d63b5ca 100644 --- a/postplug.d/10filesystems +++ b/postplug.d/10filesystems @@ -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; }