udev: fix hiding devices from qvm-block

When device becomes non-attachable (for example because it gets mounted,
or used as part of LVM/RAID/whatever), it should be removed from
advertised available devices. The code for removing QubesDB entry was
buggy - the device is actually a directory in QubesDB, not a single
entry.

QubesOS/qubes-issues#1600
pull/3/head
Marek Marczykowski-Górecki 8 years ago
parent 1d20cdea89
commit 22d6892ec9
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -9,7 +9,7 @@ QDB_KEY="/qubes-block-devices/$NAME"
xs_remove() {
if [ "$QUBES_EXPOSED" == "1" ]; then
qubesdb-rm "$QDB_KEY"
qubesdb-rm "$QDB_KEY/"
qubesdb-write /qubes-block-devices ''
fi
echo QUBES_EXPOSED=0

Loading…
Cancel
Save