X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=packaging%2Fdebian%2Fmonkeysphere.preinst;h=fd22f6faca5e5ed685ca611eecd3abe3f2c93746;hb=c71fa871b97700d696c5222201405ab681f0b4e9;hp=860286b069de5db0927b9bd527d80a1404bd2a9a;hpb=3726f3dd674e74258c5f47b00f3f6f15f4037175;p=monkeysphere.git diff --git a/packaging/debian/monkeysphere.preinst b/packaging/debian/monkeysphere.preinst index 860286b..fd22f6f 100755 --- a/packaging/debian/monkeysphere.preinst +++ b/packaging/debian/monkeysphere.preinst @@ -2,21 +2,24 @@ # preinst script for monkeysphere -# Author: Jameson Rollins -# Copyright 2008 +# Author: Jameson Rollins +# Copyright 2008-2009 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 + +# move the old server conf file to be the authentication conf file +if [ -f "$ETC"/monkeysphere-server.conf -a \ + ! -f "$ETC"/monkeysphere-authentication.conf ] ; then + mv "$ETC"/monkeysphere-server.conf "$ETC"/monkeysphere-authentication.conf fi + +# remove the old gpg-*.conf files +rm -f "$ETC"/gpg-host.conf +rm -f "$ETC"/gpg-authentication.conf + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0