summaryrefslogtreecommitdiff
path: root/contrib/osx/TorPostflight
diff options
context:
space:
mode:
authorAndrew Lewman <andrew@torproject.org>2007-09-21 01:59:53 +0000
committerAndrew Lewman <andrew@torproject.org>2007-09-21 01:59:53 +0000
commit6aadc6071e1eace36920fee7ae79dd53c2cc6811 (patch)
tree338db5ec6c2a4d469567f91f949d3342a4336a36 /contrib/osx/TorPostflight
parentfdf390525c423c93851e8893c7b778788f9654ab (diff)
downloadtor-6aadc6071e1eace36920fee7ae79dd53c2cc6811.tar.gz
tor-6aadc6071e1eace36920fee7ae79dd53c2cc6811.zip
Fix a potential issue in the osx pre and postflight scripts.
svn:r11548
Diffstat (limited to 'contrib/osx/TorPostflight')
-rw-r--r--contrib/osx/TorPostflight8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight
index b1a9e541f4..20c7d0338b 100644
--- a/contrib/osx/TorPostflight
+++ b/contrib/osx/TorPostflight
@@ -83,10 +83,10 @@ if [ -f $PACKAGE_PATH/Contents/Resources/package_list.txt ]; then
fi
# If the pre-install script did it's thing, it should have saved the
-# config and server keys; put these back and clean up
-if [ -f /tmp/TorSavedMe.tar.gz ]; then
- tar zxf /tmp/TorSavedMe.tar.gz -C /
- rm /tmp/TorSavedMe.tar.gz
+# config and server keys; put these back and leave for save keeping
+TORBACKUP=`ls -rt /tmp/TorSavedMe*| tail -1`
+if [ -f ${TORBACKUP} ]; then
+ tar zxf ${TORBACKUP} -C /
fi
if [ -d /Library/StartupItems/Tor ]; then