From 7502eeeef0355325b8bda28072ac12681c689379 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Sep 2013 02:06:03 +1200 Subject: Use hash and type -P --- psshd | 4 ++-- 1 file 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)" \ -- "$@" -- cgit v1.2.3