X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Fnfs-common.postrm;h=1f8f1ebd506495c3b950f8cd234b16877ab8e615;hp=31d0f79167c389aa5cde30da676a541d10caabbb;hb=7df4be59851989329646fb6eefff8ae36721156e;hpb=8c8a9fb90c606cd8fc852a60727291cf9dea051c diff --git a/debian/nfs-common.postrm b/debian/nfs-common.postrm old mode 100755 new mode 100644 index 31d0f79..1f8f1eb --- a/debian/nfs-common.postrm +++ b/debian/nfs-common.postrm @@ -1,7 +1,28 @@ #!/bin/sh +set -e + +#DEBHELPER# + case "$1" in purge) - update-rc.d nfs-common remove >/dev/null 2>&1 + update-rc.d nfs-common remove >/dev/null + + for FILE in /etc/default/nfs-common /etc/idmapd.conf; do + # Taken from the ucf example postrm + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + rm -f $FILE$ext + done + rm -f $FILE + if [ -x /usr/bin/ucf ]; then + ucf --purge $FILE + fi + done + + rm -f /var/lib/nfs/state \ + /var/lib/nfs/sm/* \ + /var/lib/nfs/sm.bak/* + + dpkg-statoverride --remove /sbin/mount.nfs || true ;; esac