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
This commit is contained in:
parent
1d20cdea89
commit
22d6892ec9
@ -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…
Reference in New Issue
Block a user