From b72d67618bbae537cb2eaaba2a6ece1a3e475bdd Mon Sep 17 00:00:00 2001 From: Jaromil Date: Tue, 2 Jan 2018 15:35:32 +0100 Subject: [PATCH] restore square parens detection in list_tomb_mounts() --- tomb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tomb b/tomb index 0cbe3f3..3b91bac 100755 --- a/tomb +++ b/tomb @@ -2274,8 +2274,12 @@ BEGIN { main="" } ' } || { # list a specific tomb + # add square parens if not present (detection) + local tname + if [[ "${1[1]}" = "[" ]]; then tname="$1" + else tname="[$1]"; fi _sudo findmnt -rvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL \ - | awk -vtomb="[$1]" ' + | awk -vtomb="$tname" ' BEGIN { main="" } /^\/dev\/mapper\/tomb/ { if("["$5"]"!=tomb) next;