From b3004a65e3dd47433d37cd2b275713404f10c13c Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 16 Mar 2008 08:56:50 +0100 Subject: [PATCH] * Prevent set -u from falling over unset SSH_CONNECTION variable (closes: #471129). --- shutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2