]> git.street.me.uk Git - andy/dehydrated.git/commitdiff
trying to fix compatibility with mawk
authorLukas Schauer <lukas@schauer.so>
Sat, 4 Feb 2017 12:32:56 +0000 (13:32 +0100)
committerLukas Schauer <lukas@schauer.so>
Sat, 4 Feb 2017 12:32:56 +0000 (13:32 +0100)
dehydrated

index a5e5e196d40bd89b4f078e8b78c0f23970688b05..77fe9a14cb6c578505bb940715dfc38a53b69de2 100755 (executable)
@@ -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' )"