projects
/
monkeysphere.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16db054
)
Add trap to remove lockfiles on exit.
author
Jameson Graef Rollins
<jrollins@phys.columbia.edu>
Mon, 23 Jun 2008 22:53:20 +0000
(18:53 -0400)
committer
Jameson Graef Rollins
<jrollins@phys.columbia.edu>
Mon, 23 Jun 2008 22:53:20 +0000
(18:53 -0400)
src/common
patch
|
blob
|
history
diff --git
a/src/common
b/src/common
index 9dcc5e869986188cb58b4eef491f93aac1f9e3a7..1908022eb947a50681082c274456a8e10bce47ab 100644
(file)
--- 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"