From 16f7d08bcaf01c40ccaad688a8709bfced68b10e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 26 Apr 2022 22:50:50 +0200 Subject: Use losetup -d instead of --detach and add clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- wire-desktop/bash-aliases | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wire-desktop') diff --git a/wire-desktop/bash-aliases b/wire-desktop/bash-aliases index 09f4733..0fe1b9e 100644 --- a/wire-desktop/bash-aliases +++ b/wire-desktop/bash-aliases @@ -14,6 +14,7 @@ umount-wire () { asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" WIRE_DIR=~/.var/opt/wire sh -c ' umount "${WIRE_DIR}/WireCrypt.d" cryptsetup close WireCrypt - losetup --detach "$(cat -- "${XDG_RUNTIME_DIR}/WireCrypt")" + losetup -d "$(cat -- "${XDG_RUNTIME_DIR}/WireCrypt")" + rm -f -- "${XDG_RUNTIME_DIR}/WireCrypt" ' } -- cgit v1.2.3-70-g09d2