From: martin f. krafft Date: Sun, 16 Mar 2008 07:56:50 +0000 (+0100) Subject: * Prevent set -u from falling over unset SSH_CONNECTION variable X-Git-Tag: 0.3.2 X-Git-Url: https://git.madduck.net/code/molly-guard.git/commitdiff_plain/b3004a65e3dd47433d37cd2b275713404f10c13c?ds=sidebyside * Prevent set -u from falling over unset SSH_CONNECTION variable (closes: #471129). --- diff --git a/shutdown b/shutdown index 29bd8fe..0c52d92 100755 --- a/shutdown +++ b/shutdown @@ -91,7 +91,7 @@ test -t 0 || do_real_cmd # was created by sshd. PTS=$(readlink /proc/$$/fd/0) if ! pgrep -f "^sshd.+${PTS#/dev/}[[:space:]]*$" >/dev/null \ - && [ -z "$SSH_CONNECTION" ]; then + && [ -z "${SSH_CONNECTION:-}" ]; then if [ $PRETEND_SSH -eq 1 ]; then echo "I: this is not an SSH session, but --pretend-ssh was given..." else