diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-16 02:06:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-16 02:06:03 +1200 |
commit | 7502eeeef0355325b8bda28072ac12681c689379 (patch) | |
tree | 28f4523da69a8f73c4af438ab540249f5763532b | |
parent | Use less weird program comment metadata (diff) | |
download | psshd-7502eeeef0355325b8bda28072ac12681c689379.tar.gz psshd-7502eeeef0355325b8bda28072ac12681c689379.zip |
Use hash and type -P
-rwxr-xr-x | psshd | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)" \ -- "$@" |