udev: ignore temporary devices created during VM startup
(cherry picked from commit c731fa5b28
)
This commit is contained in:
parent
d4b23691f1
commit
11365e353e
@ -34,6 +34,13 @@ 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
|
||||||
|
if [[ "$DM_NAME" = 'loop'* ] && \
|
||||||
|
[[ "`cat /sys/block/${DM_NAME%p*}/loop/backing_file`" = \
|
||||||
|
'/var/lib/qubes/'*'/volatile.img' ]]; then
|
||||||
|
xs_remove
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if device is read-only
|
# Check if device is read-only
|
||||||
if [ "`cat /sys/$DEVPATH/ro`" -eq 1 ]; then
|
if [ "`cat /sys/$DEVPATH/ro`" -eq 1 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user