From 936daca4a597838563eccc47b3ec415eaca00666 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 11 Oct 2008 14:55:26 -0400 Subject: [PATCH] Add debian preinst script to move old gpg.conf files out of the way. --- debian/changelog | 7 ++++++- debian/monkeysphere.postinst | 4 ++-- debian/monkeysphere.preinst | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100755 debian/monkeysphere.preinst 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 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 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 +# 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 -- 2.26.2