Fix broken if statement in lib/tls on ZSH

When using ZSH, the line `if [[ (!$cert && !$key && $ca) ]]` fails
due to a syntax error.  Instead of checking the variables as a boolean,
we can simply check if they have a non-zero length.  This works in ZSH.

Change-Id: I171ed10a8c0af354e82bd6119508a0c44b6bcd9c
This commit is contained in:
Solly Ross 2014-03-18 15:12:05 -04:00
parent 116023f8e4
commit 66115e5323

View File

@ -348,7 +348,7 @@ function ensure_certificates {
local key=${!key_var}
local ca=${!ca_var}
if [[ !($cert && $key && $ca) ]]; then
if [[ -z "$cert" || -z "$key" || -z "$ca" ]]; then
die $LINENO "Missing either the ${cert_var} ${key_var} or ${ca_var}" \
"variable to enable SSL for ${service}"
fi