From dce638fcbd0ae6554dc07c44747b5f6e2eb0ffa3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 18 Nov 2024 22:20:47 +0100 Subject: [PATCH] =?UTF-8?q?=E2=88=92=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cs | 3 +-- cs.old | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cs b/cs index 85a53f9..9126efa 100755 --- a/cs +++ b/cs @@ -53,8 +53,7 @@ case "${action}" in ;; "${ACTION_CLOSE}") echo "${container_map_file} ← ${container_mount_directory}" - umount "${container_map_file}" - if [ ${?} -eq 0 ]; then + if umount "${container_map_file}"; then rmdir --ignore-fail-on-non-empty "${container_mount_directory}" echo "${container_file} ← ${container_map_file}" cryptsetup luksClose "${container_name}" diff --git a/cs.old b/cs.old index 85a53f9..9126efa 100755 --- a/cs.old +++ b/cs.old @@ -53,8 +53,7 @@ case "${action}" in ;; "${ACTION_CLOSE}") echo "${container_map_file} ← ${container_mount_directory}" - umount "${container_map_file}" - if [ ${?} -eq 0 ]; then + if umount "${container_map_file}"; then rmdir --ignore-fail-on-non-empty "${container_mount_directory}" echo "${container_file} ← ${container_map_file}" cryptsetup luksClose "${container_name}"