No uname on Windows

Since there's no uname command on Windows, send STDERR to /dev/null.
This just prevents an error from showing on the console but doesn't
actually change any system behavior.

Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
This commit is contained in:
Eric F Crist 2019-02-04 13:24:35 -06:00
parent e5d46199c9
commit be93f45f1e
No known key found for this signature in database
GPG Key ID: 72964219390D0D0E

View File

@ -1010,7 +1010,7 @@ at: $crt_in"
"$EASYRSA_OPENSSL" x509 -in "$crt_in" -noout -enddate |
sed 's/^notAfter=//'
)
case $(uname) in
case $(uname 2>/dev/null) in
"Darwin"|*"BSD")
expire_date=$(date -j -f '%b %d %T %Y %Z' "$expire_date" +%s)
allow_renew_date=$(date -j -v"+${EASYRSA_CERT_RENEW}d" +%s)