]> git.deb.at Git - pkg/t-prot.git/blobdiff - debian/postinst
Imported Debian patch 2.1-1
[pkg/t-prot.git] / debian / postinst
index afa0feff7d24df793c29e828b652e0c72f67b3d4..51642f22c0b1a66476972e9b518a7c1534a8ea9a 100644 (file)
@@ -1,10 +1,22 @@
 #!/bin/sh -e
 # postinst for t-prot
 
-if [ "$1" = 'configure' ] && [ -e /usr/share/debconf/confmodule ]; then
-       if dpkg --compare-versions "$2" lt "1.47-2" ; then
-               . /usr/share/debconf/confmodule
-               db_purge
-               db_stop
-       fi
+# Source debconf library.
+if [ -e /usr/share/debconf/confmodule ]; then
+       . /usr/share/debconf/confmodule
+fi
+
+if [ "$1" != 'configure' ]; then
+       exit 0
+fi
+
+symlink=true
+if [ -e /usr/share/debconf/confmodule ]; then
+       db_get t-prot/muttrc.d
+       symlink="$RET"
+fi
+
+if [ "$symlink" = "true" ]; then
+       mkdir /etc/Muttrc.d || true
+       cd /etc/Muttrc.d && ln -s ../Muttrc.t-prot t-prot.rc || true
 fi