aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:17:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:45:15 +1200
commit00076009b184212b716cd077cc37b76fbc2879ff (patch)
tree2178dc4b18bedac1b4a45682663a9c600f04703f
parentNo need to quote getopts spec (diff)
downloadpsshd-00076009b184212b716cd077cc37b76fbc2879ff.tar.gz
psshd-00076009b184212b716cd077cc37b76fbc2879ff.zip
Include self name in error messages
Just to be a bit more helpful
-rwxr-xr-xpsshd6
1 files changed, 3 insertions, 3 deletions
diff --git a/psshd b/psshd
index 4a7e4e2..22261f1 100755
--- a/psshd
+++ b/psshd
@@ -36,11 +36,11 @@ while getopts :p: opt; do
port=$OPTARG
;;
\?)
- printf 'Invalid option %s\n' "$OPTARG" >&2
+ printf '%s - Invalid option %s\n' "$self" "$OPTARG" >&2
exit 1
;;
:)
- printf 'Option -%s requires an argument\n' "$OPTARG" >&2
+ printf '%s - Option -%s requires an argument\n' "$self" "$OPTARG" >&2
exit 1
;;
esac
@@ -56,7 +56,7 @@ fi
# Set up a PID dir
rundir=${TMPDIR:-/tmp}/psshd-$UID
if ! mkdir -p "$rundir"; then
- printf 'Could not create directory %s for PID file\n' "$rundir" >&2
+ printf '%s - Could not create directory %s for PID file\n' "$self" "$rundir" >&2
exit 1
fi