check for unset variable correctly

This commit is contained in:
Girish Ramakrishnan 2016-04-11 11:46:57 -07:00
parent 35be11259d
commit 2f8df19cfe

View file

@ -23,7 +23,7 @@ setup_ldap_source() {
# SSH_PORT can be unset to disable SSH
disable_ssh="false"
if [[ -z "${SSH_PORT}" ]]; then
if [[ -z "${SSH_PORT:-}" ]]; then
echo "SSH disabled"
SSH_PORT=29418 # arbitrary port to keep sshd happy
disable_ssh="false"