summaryrefslogtreecommitdiffstats
path: root/debian/sudo-ldap.postrm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/sudo-ldap.postrm31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/sudo-ldap.postrm b/debian/sudo-ldap.postrm
new file mode 100644
index 0000000..c3b48c8
--- /dev/null
+++ b/debian/sudo-ldap.postrm
@@ -0,0 +1,31 @@
+#!/bin/sh -e
+
+case "$1" in
+ purge)
+ rm -f /etc/sudo-ldap.conf
+ rm -rf /var/lib/sudo
+ rm -rf /run/sudo
+ ;;
+
+ remove|upgrade|deconfigure)
+ ;;
+
+ abort-upgrade|failed-upgrade)
+ if [ -e "/etc/sudoers.pre-conffile" ]; then
+ mv /etc/sudoers.pre-conffile /etc/sudoers
+ fi
+ ;;
+
+
+ *)
+ echo "unknown argument --> $1" >&2
+ exit 0
+ ;;
+esac
+
+# remove sudoers entries, if any, from nsswitch.conf
+if [ -w /etc/nsswitch.conf ] ; then
+ sed -i /^sudoers:/d /etc/nsswitch.conf
+fi
+
+#DEBHELPER#