mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-31 14:13:07 +02:00
trying to fix compatibility with mawk
This commit is contained in:
@@ -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' )"
|
||||
|
||||
Reference in New Issue
Block a user