From 649aa6c163b27fe5ce22e18089352a08819302f7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 16 Sep 2022 02:57:10 +0100 Subject: Phase out fgrep due to warning --- ctmg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctmg.sh b/ctmg.sh index c9615a1..a79b5bd 100755 --- a/ctmg.sh +++ b/ctmg.sh @@ -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; } -- cgit v1.2.3-59-g8ed1b