udev: fix block devices ignoring rule

First of all there was missing ']'. Bu additionally change that rule to
detect partitioned loop devices instead of device-mapper.

(cherry picked from commit 68bbd408d7)
This commit is contained in:
Marek Marczykowski-Górecki 2015-04-03 11:14:15 +02:00
parent 11365e353e
commit 6e4fa03459
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -34,9 +34,9 @@ if [ "$MAJOR" -eq 7 -a ! -d /sys/$DEVPATH/loop ]; then
xs_remove xs_remove
exit 0 exit 0
fi fi
# ... and temporary device-mapper devices used during VM startup # ... and temporary devices used during VM startup
if [[ "$DM_NAME" = 'loop'* ] && \ if [[ "$NAME" = 'loop'* ]] && \
[[ "`cat /sys/block/${DM_NAME%p*}/loop/backing_file`" = \ [[ "`cat /sys/block/${NAME%p*}/loop/backing_file`" = \
'/var/lib/qubes/'*'/volatile.img' ]]; then '/var/lib/qubes/'*'/volatile.img' ]]; then
xs_remove xs_remove
exit 0 exit 0