X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Fpostrm;h=76b38705d259e250ff50998636cb145e5d67abf7;hb=ec21e25ffd8fe61704ae3588bcad4570de2946ac;hp=d388fb4c268242df150c36811b30089a70c5f401;hpb=0dd1d38a222a5e2e95879ab2397a83d4108d3379;p=pkg%2Fabook.git diff --git a/debian/postrm b/debian/postrm index d388fb4..76b3870 100644 --- a/debian/postrm +++ b/debian/postrm @@ -5,7 +5,23 @@ if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi -if [ "$1" = 'purge' -a -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_purge -fi +action=$1 + +case "$action" in + remove) + if [ ! -e /etc/Muttrc.d/abook.rc.removed ]; then + # only disable the config snippet + mv /etc/Muttrc.d/abook.rc /etc/Muttrc.d/abook.rc.removed || true + fi + ;; + purge) + rm /etc/Muttrc.d/abook.rc.removed 2> /dev/null || true + rm /etc/Muttrc.d/abook.rc 2> /dev/null || true + rmdir /etc/Muttrc.d 2> /dev/null || true + # remove debconf data on purge + if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge + fi + ;; +esac