summaryrefslogtreecommitdiff
path: root/debian/monkeysphere.preinst
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-11 14:55:26 -0400
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-11 14:55:26 -0400
commit936daca4a597838563eccc47b3ec415eaca00666 (patch)
tree7a21d7c9afbf24aa19b5f9aa7a2eae2385899767 /debian/monkeysphere.preinst
parenta746da0ddeed35013ef135e7a0f0aba82d568767 (diff)
Add debian preinst script to move old gpg.conf files out of the way.
Diffstat (limited to 'debian/monkeysphere.preinst')
-rwxr-xr-xdebian/monkeysphere.preinst18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/monkeysphere.preinst b/debian/monkeysphere.preinst
new file mode 100755
index 0000000..bfa6a91
--- /dev/null
+++ b/debian/monkeysphere.preinst
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+# preinst script for monkeysphere
+
+# Author: Jameson Rollins <jrollins@fifthhorseman.net>
+# Copyright 2008
+
+ETC="/etc/monkeysphere"
+VARLIB="/var/lib/monkeysphere"
+
+# move the gpg.conf files from the GNUPGHOMEs if they're there to
+# /etc, where they will be linked back into the GNUPGHOMEs later
+if [ -f "$VARLIB"/gnupg-host/gpg.conf -a ! -L "$VARLIB"/gnupg-host/gpg.conf ] ; then
+ mv "$VARLIB"/gnupg-host/gpg.conf "$ETC"/gpg-host.conf
+fi
+if [ -f "$VARLIB"/gnupg-authentication/gpg.conf -a ! -L "$VARLIB"/gnupg-authentication/gpg.conf ] ; then
+ mv "$VARLIB"/gnupg-authentication/gpg.conf "$ETC"/gnupg-authentication.conf
+fi