Add debian preinst script to move old gpg.conf files out of the way.
authorJameson Graef Rollins <jrollins@phys.columbia.edu>
Sat, 11 Oct 2008 18:55:26 +0000 (14:55 -0400)
committerJameson Graef Rollins <jrollins@phys.columbia.edu>
Sat, 11 Oct 2008 18:55:26 +0000 (14:55 -0400)
debian/changelog
debian/monkeysphere.postinst
debian/monkeysphere.preinst [new file with mode: 0755]

index 32d5a1938287a72530d2d84b6cf1cb6ff52a6398..7acf323520db5da649cce0a7909f9fa08ae12194 100644 (file)
@@ -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
 
index bd3062fa5742057638d375710630e528a6b76dea..0e361867e6a0555f6950b2f7748cc4bbdbbe0e56 100755 (executable)
@@ -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 (executable)
index 0000000..bfa6a91
--- /dev/null
@@ -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