From: Lukas Schauer Date: Sat, 4 Feb 2017 12:32:56 +0000 (+0100) Subject: trying to fix compatibility with mawk X-Git-Tag: v0.4.0~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d8d320c9f5a8dbd2621de28cd02f8ba15be5dbf;p=thirdparty%2Fdehydrated.git trying to fix compatibility with mawk --- diff --git a/dehydrated b/dehydrated index a5e5e19..77fe9a1 100755 --- a/dehydrated +++ b/dehydrated @@ -446,7 +446,7 @@ extract_altnames() { reqtext="$( <<<"${csr}" openssl req -noout -text )" if <<<"${reqtext}" grep -q '^[[:space:]]*X509v3 Subject Alternative Name:[[:space:]]*$'; then # SANs used, extract these - altnames="$( <<<"${reqtext}" awk '/^[[:space:]]*X509v3 Subject Alternative Name:[[:space:]]*$/{print;getline;print;}' | tail -n1 )" + altnames="$( <<<"${reqtext}" awk '/X509v3 Subject Alternative Name:/{print;getline;print;}' | tail -n1 )" # split to one per line: # shellcheck disable=SC1003 altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/g' )"