diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-09-16 02:57:10 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-09-16 02:57:10 +0100 |
commit | 649aa6c163b27fe5ce22e18089352a08819302f7 (patch) | |
tree | 279c65d62701195ddb5bdfa870154a0476d3f537 /ctmg.sh | |
parent | Add note about sparse files (diff) | |
download | ctmg-649aa6c163b27fe5ce22e18089352a08819302f7.tar.xz ctmg-649aa6c163b27fe5ce22e18089352a08819302f7.zip |
Diffstat (limited to 'ctmg.sh')
-rwxr-xr-x | ctmg.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -39,7 +39,7 @@ unwind() { [[ $keep_open -eq 1 ]] && return for i in {1..5}; do - echo -e "$(cut -d ' ' -f 2 /proc/mounts)" | fgrep -wq "$mount_path" || break + echo -e "$(cut -d ' ' -f 2 /proc/mounts)" | grep -Fwq "$mount_path" || break trace umount "$mount_path" && break trace sleep $i done @@ -117,7 +117,7 @@ cmd_close() { [[ $# -ne 1 ]] && die "Usage: $PROGRAM close container_path" initialize_container "$1" keep_open=1 - echo -e "$(cut -d ' ' -f 2 /proc/mounts)" | fgrep -wq "$mount_path" && { trace umount "$mount_path" || die "Could not unmount $mount_path"; } + echo -e "$(cut -d ' ' -f 2 /proc/mounts)" | grep -Fwq "$mount_path" && { trace umount "$mount_path" || die "Could not unmount $mount_path"; } trace cryptsetup luksClose "$mapper_name" [[ $? -eq 0 || $? -eq 4 ]] || die "Could not close LUKS mapping $mapper_name" [[ -d $mount_path ]] && { trace rmdir "$mount_path" || echo "[-] Non-fatal: could not remove $mount_path directory" >&2; } |