summaryrefslogtreecommitdiff
path: root/src/share/m
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2009-04-05 15:05:36 -0700
committerJameson Graef Rollins <jrollins@finestructure.net>2009-04-05 15:05:36 -0700
commitc0724b8e7aefd9ced1740a970941928f5b168b2b (patch)
treeca6283365dafa6babff62dd2e2792853c1b5c816 /src/share/m
parent1687f57fcfb41453539313d66b8b01bd073c4577 (diff)
some small compatibility changes:
- fix file_hash function to use md5 or md5sum, for Darwin compatibility - use build-in 'type' instead of 'which', which for some reason doesn't behave on Darwin - clean up some redirection calls.
Diffstat (limited to 'src/share/m')
-rw-r--r--src/share/m/ssh_proxycommand6
-rw-r--r--src/share/m/subkey_to_ssh_agent2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/share/m/ssh_proxycommand b/src/share/m/ssh_proxycommand
index 77f9d24..74b0f85 100644
--- a/src/share/m/ssh_proxycommand
+++ b/src/share/m/ssh_proxycommand
@@ -186,7 +186,7 @@ URI="ssh://${HOSTP}"
# CHECK_KEYSERVER variable in the monkeysphere.conf file.
# if the host is in the gpg keyring...
-if gpg_user --list-key ="${URI}" 2>&1 >/dev/null ; then
+if gpg_user --list-key ="${URI}" &>/dev/null ; then
# do not check the keyserver
CHECK_KEYSERVER=${CHECK_KEYSERVER:="false"}
@@ -253,9 +253,9 @@ esac
# exec a netcat passthrough to host for the ssh connection
if [ -z "$NO_CONNECT" ] ; then
- if (which nc 2>/dev/null >/dev/null); then
+ if (type nc &>/dev/null); then
exec nc "$HOST" "$PORT"
- elif (which socat 2>/dev/null >/dev/null); then
+ elif (type socat &>/dev/null); then
exec socat STDIO "TCP:$HOST:$PORT"
else
echo "Neither netcat nor socat found -- could not complete monkeysphere-ssh-proxycommand connection to $HOST:$PORT" >&2
diff --git a/src/share/m/subkey_to_ssh_agent b/src/share/m/subkey_to_ssh_agent
index aa647a6..edc177b 100644
--- a/src/share/m/subkey_to_ssh_agent
+++ b/src/share/m/subkey_to_ssh_agent
@@ -27,7 +27,7 @@ subkey_to_ssh_agent() {
local kname
# if there's no agent running, don't bother:
- if [ -z "$SSH_AUTH_SOCK" ] || ! which ssh-add >/dev/null ; then
+ if [ -z "$SSH_AUTH_SOCK" ] || ! type ssh-add >/dev/null ; then
failure "No ssh-agent available."
fi