X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fcommon;h=5bb0b79fac779d08348721f2d3e5d6df0f29ed5a;hb=91bf57bac7bed32937c13595044158007e7b5812;hp=9dcc5e869986188cb58b4eef491f93aac1f9e3a7;hpb=241254abd25c217ffe3ee8ccb7858498ade28856;p=monkeysphere.git diff --git a/src/common b/src/common index 9dcc5e8..5bb0b79 100644 --- a/src/common +++ b/src/common @@ -109,7 +109,7 @@ translate_ssh_variables() { echo "$path" } -### CONVERTION UTILITIES +### CONVERSION UTILITIES # output the ssh key for a given key ID gpg2ssh() { @@ -263,7 +263,7 @@ process_user_id() { fi requiredPubCapability=$(echo "$requiredCapability" | tr "[:lower:]" "[:upper:]") - # if CHECK_KEYSERVER variable set, check the keyserver + # if CHECK_KEYSERVER variable set to true, check the keyserver # for the user ID if [ "$CHECK_KEYSERVER" = "true" ] ; then gpg_fetch_userid "$userID" @@ -445,6 +445,9 @@ update_known_hosts() { # least one host returnCode=0 + # set the trap to remove any lockfiles on exit + trap "lockfile-remove $KNOWN_HOSTS" EXIT + # create a lockfile on known_hosts lockfile-create "$KNOWN_HOSTS" @@ -526,6 +529,9 @@ update_authorized_keys() { # at least one user ID returnCode=0 + # set the trap to remove any lockfiles on exit + trap "lockfile-remove $AUTHORIZED_KEYS" EXIT + # create a lockfile on authorized_keys lockfile-create "$AUTHORIZED_KEYS"