From 32380c6e7a0b04085adec8ebc037d6b8879d2c6e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 8 Jan 2010 13:39:24 -0200 Subject: Adding trap into genpair to make sure work folder is removed --- share/keyringer/genpair | 3 +++ 1 file changed, 3 insertions(+) (limited to 'share') diff --git a/share/keyringer/genpair b/share/keyringer/genpair index 7b79998..acd9efa 100755 --- a/share/keyringer/genpair +++ b/share/keyringer/genpair @@ -138,6 +138,8 @@ WORK="`mktemp -d $KEYDIR/genpair.XXXXXX`" if [ "$?" != "0" ]; then echo "Error setting up $WORK" exit 1 +else + trap "rm -rf $WORK" EXIT fi # Dispatch @@ -147,3 +149,4 @@ genpair_$KEYTYPE # Cleanup cd $CWD rm -rf $WORK +trap - EXIT -- cgit v1.2.3