From af5d25c5a96e21d5b6f14ad91fcc537651b36575 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Mon, 16 Aug 2021 17:55:32 +0200 Subject: [PATCH] btrbk-verify: expect single quotes from btrbk raw table output --- contrib/cron/btrbk-verify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/cron/btrbk-verify b/contrib/cron/btrbk-verify index 6a19f54..842965e 100755 --- a/contrib/cron/btrbk-verify +++ b/contrib/cron/btrbk-verify @@ -302,7 +302,7 @@ start_ssh_agent() eval_btrbk_resolved_line() { - local line=$1 + local line=" $1" local prefix=$2 local required_keys=$3 # reset all variables first @@ -311,7 +311,7 @@ eval_btrbk_resolved_line() done for vv in $required_keys; do # basic input validation, set prefixed variable (eval) - local match="${vv}"'="([^"]*)"' + local match=" ${vv}='([^']*('\\\\''[^']*)*)'" if [[ $line =~ $match ]] ; then eval "${prefix}${vv}='${BASH_REMATCH[1]}'" || return 1 else