X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/f9f7e9dffb3180d1c53d5342172275cc216e54a7..a2cb2ff4217f955f1cfbc836927f8a9f8f57b9eb:/bin/start-ssh-agent diff --git a/bin/start-ssh-agent b/bin/start-ssh-agent index d5389d8..88fd657 100755 --- a/bin/start-ssh-agent +++ b/bin/start-ssh-agent @@ -29,6 +29,12 @@ case $chosen,$style in ;; esac +## Check that this stands a chance of working. +if ! type >/dev/null 2>&1 ssh-agent || ! type >/dev/null >&1 ssh-add; then + echo >&2 "$0: ssh not installed; chickening out" + exit 1 +fi + ## Some useful variables. hostname=${HOST-$(hostname)} user=${USER-${LOGNAME-$(id -un)}} uid=${UID-$(id -u)}