summaryrefslogtreecommitdiff
path: root/debian
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
parenta746da0ddeed35013ef135e7a0f0aba82d568767 (diff)
Add debian preinst script to move old gpg.conf files out of the way.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog7
-rwxr-xr-xdebian/monkeysphere.postinst4
-rwxr-xr-xdebian/monkeysphere.preinst18
3 files changed, 26 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 32d5a19..7acf323 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,7 +13,12 @@ monkeysphere (0.16~pre-1) UNRELEASED; urgency=low
* monkeysphere-server diagnostics now counts problems and suggests a
re-run after they have been resolved.
- -- Daniel Kahn Gillmor <dkg@fifthhorseman.net> Thu, 11 Sep 2008 23:16:31 -0400
+ [ Jameson Graef Rollins ]
+ * Genericize fs location variables.
+ * break out gpg.conf files into SYSCONFIGDIR, and not auto-generated at
+ install.
+
+ -- Jameson Graef Rollins <jrollins@phys.columbia.edu> Sat, 11 Oct 2008 14:27:17 -0400
monkeysphere (0.15-1) experimental; urgency=low
diff --git a/debian/monkeysphere.postinst b/debian/monkeysphere.postinst
index bd3062f..0e36186 100755
--- a/debian/monkeysphere.postinst
+++ b/debian/monkeysphere.postinst
@@ -20,9 +20,9 @@ fi
# install host gnupg home directory
install --owner root --group monkeysphere --mode 750 -d "$VARLIB"/gnupg-host
# link in the gpg.conf
-ln -s "$ETC"/gnupg-host.conf "$VARLIB"/gnupg-host/gpg.conf
+ln -sf "$ETC"/gnupg-host.conf "$VARLIB"/gnupg-host/gpg.conf
# install authentication gnupg home directory
install --owner monkeysphere --group monkeysphere --mode 700 -d "$VARLIB"/gnupg-authentication
# link in the gpg.conf
-ln -s "$ETC"/gnupg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf
+ln -sf "$ETC"/gnupg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf
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