aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:06:41 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:42:03 +1200
commit832acfdc942c9718cb0db9d4d12b85c8198a2bc8 (patch)
treea09cb156b7ff593d5f336246fef501d59aa239b2
parentNo need to quote in variable assignment (diff)
downloadpsshd-832acfdc942c9718cb0db9d4d12b85c8198a2bc8.tar.gz
psshd-832acfdc942c9718cb0db9d4d12b85c8198a2bc8.zip
Fix harebrained printf patterns
-rwxr-xr-xpsshd8
1 files changed, 4 insertions, 4 deletions
diff --git a/psshd b/psshd
index 0351ad4..4fea0fe 100755
--- a/psshd
+++ b/psshd
@@ -36,11 +36,11 @@ while getopts ':p:' opt; do
port=$OPTARG
;;
\?)
- printf "Invalid option $OPTARG\n" >&2
+ printf 'Invalid option %s\n' "$OPTARG" >&2
exit 1
;;
:)
- printf "Option -$OPTARG requires an argument\n" >&2
+ printf 'Option -%s requires an argument\n' "$OPTARG" >&2
exit 1
;;
esac
@@ -49,14 +49,14 @@ shift $((OPTIND-1))
# If no port, give up with usage instructions
if ! [[ "$port" ]]; then
- printf "USAGE: $0 -p <port number> -- <ssh arguments>\n"
+ printf 'USAGE: %s -p <port number> -- <ssh arguments>\n' "$self"
exit 1
fi
# Set up a PID dir
dir=${TMPDIR:-/tmp}/psshd-${UID}
if ! mkdir -p "$dir"; then
- printf "Couldn't create directory ${dir} for PID file\n" >&2
+ printf 'Could not create directory %s for PID file\n' "$dir" >&2
exit 1
fi