Actually unmount nbd

This commit is contained in:
2026-09-08 03:46:52 +08:00
parent bdb089dee5
commit 8d301fe101
+1 -2
View File
@@ -27,10 +27,9 @@ if [ -z "$NBD_TARGET" ]; then
exit 1 exit 1
fi fi
echo going to unmount "$NBD_TARGET"
if mount | grep ^"$NBD_TARGET" -q ; then if mount | grep ^"$NBD_TARGET" -q ; then
echo "$NBD_TARGET mounted, refusing to detach" echo "$NBD_TARGET mounted, refusing to detach"
exit 1 exit 1
fi fi
echo qemu-nbd --disconnect=$NBD_TARGET qemu-nbd --disconnect=$NBD_TARGET