udev: update hotplug block scripts for QubesDB
Some initial work was done, but apparently not complete and buggy.
This commit is contained in:
parent
f7325b3e9e
commit
b4f48c1770
@ -63,8 +63,8 @@ fi
|
|||||||
# The last one is meant to trigger watches
|
# The last one is meant to trigger watches
|
||||||
qubesdb-write \
|
qubesdb-write \
|
||||||
"$QDB_KEY/desc" "$DESC" \
|
"$QDB_KEY/desc" "$DESC" \
|
||||||
"$XS_KEY/size" "$SIZE" \
|
"$QDB_KEY/size" "$SIZE" \
|
||||||
"$XS_KEY/mode" "$MODE" \
|
"$QDB_KEY/mode" "$MODE" \
|
||||||
/qubes-block-devices ''
|
/qubes-block-devices ''
|
||||||
echo QUBES_EXPOSED=1
|
echo QUBES_EXPOSED=1
|
||||||
|
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
NAME=${DEVNAME#/dev/}
|
NAME=${DEVNAME#/dev/}
|
||||||
QDB_KEY="/qubes-block-devices/$NAME"
|
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 ''
|
qubesdb-write /qubes-block-devices ''
|
||||||
|
|
||||||
# If device was connected to some VM - detach it
|
# If device was connected to some VM - detach it
|
||||||
|
Loading…
Reference in New Issue
Block a user