aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-16 02:06:03 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-16 02:06:03 +1200
commit7502eeeef0355325b8bda28072ac12681c689379 (patch)
tree28f4523da69a8f73c4af438ab540249f5763532b
parentUse less weird program comment metadata (diff)
downloadpsshd-7502eeeef0355325b8bda28072ac12681c689379.tar.gz
psshd-7502eeeef0355325b8bda28072ac12681c689379.zip
Use hash and type -P
-rwxr-xr-xpsshd4
1 files changed, 2 insertions, 2 deletions
diff --git a/psshd b/psshd
index 7e5483e..ab17a8b 100755
--- a/psshd
+++ b/psshd
@@ -22,7 +22,7 @@ PATH=/usr/lib/autossh/autossh:/sbin:$PATH
# Check we have access to the required binaries
cmds=(autossh start-stop-daemon)
for cmd in "${cmds[@]}"; do
- if ! type -p "$cmd" >/dev/null; then
+ if ! hash "$cmd" >/dev/null; then
printf '%s - Could not find %s in PATH\n' "$self" "$cmd" >&2
exit 127
fi
@@ -54,6 +54,6 @@ start-stop-daemon \
--start \
--quiet \
--pidfile "$AUTOSSH_PIDFILE" \
- --exec "$(type -p autossh)" \
+ --exec "$(type -P autossh)" \
-- "$@"