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)
release2
Marek Marczykowski-Górecki 9 years ago
parent 11365e353e
commit 6e4fa03459
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -34,9 +34,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

Loading…
Cancel
Save