summaryrefslogtreecommitdiffstats
path: root/debian/nfs-common.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/nfs-common.postrm')
-rw-r--r--debian/nfs-common.postrm27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/nfs-common.postrm b/debian/nfs-common.postrm
new file mode 100644
index 0000000..2a0ce42
--- /dev/null
+++ b/debian/nfs-common.postrm
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+case "$1" in
+ purge)
+ for FILE in /etc/default/nfs-common /etc/idmapd.conf /etc/nfs.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 /etc/nfs.conf.d/local.conf
+
+ rm -f /var/lib/nfs/state \
+ /var/lib/nfs/sm/* \
+ /var/lib/nfs/sm.bak/*
+
+ dpkg-statoverride --remove /sbin/mount.nfs || true
+ ;;
+esac