From: Jameson Graef Rollins Date: Mon, 23 Jun 2008 22:53:20 +0000 (-0400) Subject: Add trap to remove lockfiles on exit. X-Git-Tag: monkeysphere_0.3-1~3^2~4 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=da4eaf98b33ae5acd3280f4fa4dbe023997135dd;p=monkeysphere.git Add trap to remove lockfiles on exit. --- diff --git a/src/common b/src/common index 9dcc5e8..1908022 100644 --- a/src/common +++ b/src/common @@ -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"