udev: update hotplug block scripts for QubesDB

Some initial work was done, but apparently not complete and buggy.
release3.0 mm_b4f48c17
Marek Marczykowski-Górecki 10 years ago
parent f7325b3e9e
commit b4f48c1770

@ -63,8 +63,8 @@ fi
# The last one is meant to trigger watches
qubesdb-write \
"$QDB_KEY/desc" "$DESC" \
"$XS_KEY/size" "$SIZE" \
"$XS_KEY/mode" "$MODE" \
"$QDB_KEY/size" "$SIZE" \
"$QDB_KEY/mode" "$MODE" \
/qubes-block-devices ''
echo QUBES_EXPOSED=1

@ -2,7 +2,9 @@
NAME=${DEVNAME#/dev/}
QDB_KEY="/qubes-block-devices/$NAME"
qubesdb-rm "$XS_KEY"
# Trailing slash is intentional - it will remove whole directory, instead of
# single base entry
qubesdb-rm "$QDB_KEY/"
qubesdb-write /qubes-block-devices ''
# If device was connected to some VM - detach it

Loading…
Cancel
Save