summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/monkeysphere-authentication5
-rwxr-xr-xsrc/monkeysphere-host5
-rw-r--r--src/share/ma/update_users9
3 files changed, 4 insertions, 15 deletions
diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication
index c009653..c5c48d5 100755
--- a/src/monkeysphere-authentication
+++ b/src/monkeysphere-authentication
@@ -42,9 +42,6 @@ DATE=$(date -u '+%FT%T')
# unset some environment variables that could screw things up
unset GREP_OPTIONS
-# default return code
-RETURN=0
-
########################################################################
# FUNCTIONS
########################################################################
@@ -211,5 +208,3 @@ case $COMMAND in
Type '$PGRM help' for usage."
;;
esac
-
-exit "$RETURN"
diff --git a/src/monkeysphere-host b/src/monkeysphere-host
index c454354..5e7a931 100755
--- a/src/monkeysphere-host
+++ b/src/monkeysphere-host
@@ -41,9 +41,6 @@ DATE=$(date -u '+%FT%T')
# unset some environment variables that could screw things up
unset GREP_OPTIONS
-# default return code
-RETURN=0
-
########################################################################
# FUNCTIONS
########################################################################
@@ -327,5 +324,3 @@ case $COMMAND in
Type '$PGRM help' for usage."
;;
esac
-
-exit "$RETURN"
diff --git a/src/share/ma/update_users b/src/share/ma/update_users
index bfefc31..c180b56 100644
--- a/src/share/ma/update_users
+++ b/src/share/ma/update_users
@@ -13,6 +13,7 @@
update_users() {
+local returnCode=0
local unames
local uname
local authorizedKeysDir
@@ -26,8 +27,6 @@ else
unames=$(getent passwd | cut -d: -f1)
fi
-RETURN=0
-
# set mode
MODE="authorized_keys"
@@ -94,7 +93,7 @@ for uname in $unames ; do
# process authorized_user_ids file, as monkeysphere user
su_monkeysphere_user \
". ${SYSSHAREDIR}/common; process_authorized_user_ids $TMP_AUTHORIZED_USER_IDS" \
- || RETURN="$?"
+ || returnCode="$?"
else
log debug "not processing authorized_user_ids."
fi
@@ -141,7 +140,7 @@ for uname in $unames ; do
log error "Failed to install authorized_keys for '$uname'!"
rm -f "${authorizedKeysDir}/${uname}"
# indicate that there has been a failure:
- RETURN=1
+ returnCode=1
}
else
rm -f "${authorizedKeysDir}/${uname}"
@@ -154,5 +153,5 @@ for uname in $unames ; do
rm -rf "$TMPLOC"
done
-return $RETURN
+return $returnCode
}