From 09286dd29ec1cbee1d0c3abd7ebeba513561b52e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 14 Sep 2013 17:06:28 +1200 Subject: No need to quote in variable assignment --- psshd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/psshd b/psshd index c963d4c..0351ad4 100755 --- a/psshd +++ b/psshd @@ -33,7 +33,7 @@ done while getopts ':p:' opt; do case $opt in p) - port="$OPTARG" + port=$OPTARG ;; \?) printf "Invalid option $OPTARG\n" >&2 @@ -54,15 +54,15 @@ if ! [[ "$port" ]]; then fi # Set up a PID dir -dir="${TMPDIR:-/tmp}/psshd-${UID}" +dir=${TMPDIR:-/tmp}/psshd-${UID} if ! mkdir -p "$dir"; then printf "Couldn't create directory ${dir} for PID file\n" >&2 exit 1 fi # Export the two settings autossh absolutely needs -AUTOSSH_PIDFILE="${dir}/psshd-port-${port}.pid" -AUTOSSH_PORT="$port" +AUTOSSH_PIDFILE=${dir}/psshd-port-${port}.pid +AUTOSSH_PORT=$port export AUTOSSH_PIDFILE AUTOSSH_PORT # Use start-stop-daemon to run it sanely -- cgit v1.2.3