summaryrefslogtreecommitdiff
path: root/src/monkeysphere
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2009-02-21 14:57:41 -0500
committerJameson Graef Rollins <jrollins@finestructure.net>2009-02-21 14:57:41 -0500
commitff8383ce9092335de6c00447bb45a2a7fbbf8685 (patch)
tree0bcf398381cb8b29743284450f728ecfd44609ee /src/monkeysphere
parent64150bc621cda2167c81ce4283b934d17a4dbe56 (diff)
make sure we're explicitly capturing return codes in places where they are tested, in case things are being run set -e
Diffstat (limited to 'src/monkeysphere')
-rwxr-xr-xsrc/monkeysphere14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/monkeysphere b/src/monkeysphere
index a65cef6..b30453c 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -27,9 +27,6 @@ DATE=$(date -u '+%FT%T')
# unset some environment variables that could screw things up
unset GREP_OPTIONS
-# default return code
-RETURN=0
-
# set the file creation mask to be only owner rw
umask 077
@@ -87,9 +84,11 @@ check_gpg_sec_key_id() {
echo "$gpgSecOut" | cut -d: -f5
;;
*)
- echo "Multiple primary secret keys found:" | log error
- echo "$gpgSecOut" | cut -d: -f5 | log error
- echo "Please specify which primary key to use." | log error
+ echo "Multiple primary secret keys found:"
+ for key in $(echo "$gpgSecOut" | cut -d: -f5) ; do
+ echo " $key"
+ done
+ echo "Please specify which primary key to use."
failure
;;
esac
@@ -203,13 +202,11 @@ case $COMMAND in
# those hosts
if [ "$1" ] ; then
update_known_hosts "$@"
- RETURN="$?"
# otherwise, if no hosts are specified, process every host
# in the user's known_hosts file
else
process_known_hosts
- RETURN="$?"
fi
;;
@@ -219,7 +216,6 @@ case $COMMAND in
# process authorized_user_ids file
process_authorized_user_ids "$AUTHORIZED_USER_IDS"
- RETURN="$?"
;;
'import-subkey'|'i')