udev-block-add-change: ignore unconnected Network Block Device

"modprobe nbd" shouldn't instantly send 16 zero byte nbd devices to
dom0.
pull/31/head
Rusty Bird 6 years ago
parent 929e03bcba
commit 6b3830ba31
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

@ -119,6 +119,12 @@ if [ "$MAJOR" -eq 7 -a ! -d /sys/$DEVPATH/loop ]; then
exit 0
fi
# or unconnected Network Block Device
if [ "$MAJOR" -eq 43 -a ! -e /sys/$DEVPATH/pid ]; then
xs_remove
exit 0
fi
# ... and loop devices from excluded directories
if [[ "$NAME" = 'loop'* ]]; then
backing_file=$(cat /sys/block/${NAME}/loop/backing_file)

Loading…
Cancel
Save