aboutsummaryrefslogtreecommitdiffstats
path: root/ctmg.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-09-16 02:57:10 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2022-09-16 02:57:10 +0100
commit649aa6c163b27fe5ce22e18089352a08819302f7 (patch)
tree279c65d62701195ddb5bdfa870154a0476d3f537 /ctmg.sh
parentAdd note about sparse files (diff)
downloadctmg-649aa6c163b27fe5ce22e18089352a08819302f7.tar.xz
ctmg-649aa6c163b27fe5ce22e18089352a08819302f7.zip
Phase out fgrep due to warningHEADmaster
Diffstat (limited to 'ctmg.sh')
-rwxr-xr-xctmg.sh4
1 files 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; }