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.
This commit is contained in:
Marek Marczykowski-Górecki 2015-04-03 11:14:15 +02:00
parent 0eeb7b8bf0
commit 68bbd408d7

View File

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