# unset some environment variables that could screw things up
GREP_OPTIONS=
+# default return code
+ERR=0
+export ERR
+
########################################################################
# FUNCTIONS
########################################################################
# if hosts are specified on the command line, process just
# those hosts
if [ "$1" ] ; then
- process_hosts_known_hosts "$@"
+ update_known_hosts "$@" || ERR=1
# otherwise, if no hosts are specified, process every host
# in the user's known_hosts file
failure "known_hosts file '$KNOWN_HOSTS' is empty."
fi
log "processing known_hosts file..."
- process_known_hosts
+ process_known_hosts || ERR=1
fi
log "known_hosts file updated."
# process authorized_user_ids file
log "processing authorized_user_ids file..."
- process_authorized_user_ids "$AUTHORIZED_USER_IDS"
+ process_authorized_user_ids "$AUTHORIZED_USER_IDS" || ERR=1
log "authorized_keys file updated."
;;
Type '$PGRM help' for usage."
;;
esac
+
+exit "$ERR"