Commit 555840e2 authored by Silvan Calarco's avatar Silvan Calarco

filesystems: revert removable partitions check using udisks because...

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
parent 2da950c7
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment