summaryrefslogtreecommitdiff
path: root/packaging/debian/monkeysphere.preinst
diff options
context:
space:
mode:
authorMatt Goins <mjgoins@openflows.com>2008-11-16 11:18:38 -0500
committerMatt Goins <mjgoins@openflows.com>2008-11-16 11:18:38 -0500
commite7c994d6f67d380ed0de21f1500ec395eaab6640 (patch)
treee4c81a45e2dcfdd46409beab222d122751f5f6d7 /packaging/debian/monkeysphere.preinst
parent9aec501a27b51523165a05c4c4da0cc9251424e8 (diff)
parent5d9949335aeb1dec04f530cbb3dfcac24288706a (diff)
Merge commit 'dkg/master'
Diffstat (limited to 'packaging/debian/monkeysphere.preinst')
-rwxr-xr-xpackaging/debian/monkeysphere.preinst29
1 files changed, 29 insertions, 0 deletions
diff --git a/packaging/debian/monkeysphere.preinst b/packaging/debian/monkeysphere.preinst
new file mode 100755
index 0000000..528da84
--- /dev/null
+++ b/packaging/debian/monkeysphere.preinst
@@ -0,0 +1,29 @@
+#!/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
+ chown root:root "$ETC"/gpg-host.conf
+ ln -s "$ETC"/gpg-host.conf "$VARLIB"/gnupg-host/gpg.conf
+fi
+if [ -f "$VARLIB"/gnupg-authentication/gpg.conf -a ! -L "$VARLIB"/gnupg-authentication/gpg.conf ] ; then
+ mv "$VARLIB"/gnupg-authentication/gpg.conf "$ETC"/gpg-authentication.conf
+ chown root:root "$ETC"/gpg-authentication.conf
+ ln -s "$ETC"/gpg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0