diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 17:17:36 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 17:45:15 +1200 |
commit | 00076009b184212b716cd077cc37b76fbc2879ff (patch) | |
tree | 2178dc4b18bedac1b4a45682663a9c600f04703f | |
parent | No need to quote getopts spec (diff) | |
download | psshd-00076009b184212b716cd077cc37b76fbc2879ff.tar.gz psshd-00076009b184212b716cd077cc37b76fbc2879ff.zip |
Include self name in error messages
Just to be a bit more helpful
-rwxr-xr-x | psshd | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |