]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - debian/nfs-common.postrm
Install osd_login (part of the autologin feature). - Add open-iscsi and watchdog...
[nfs-utils.git] / debian / nfs-common.postrm
old mode 100755 (executable)
new mode 100644 (file)
index 4e90417..1f8f1eb
@@ -1,9 +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