summaryrefslogtreecommitdiff
path: root/debian/sudo-ldap.preinst
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-21 14:19:45 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-21 14:19:45 +0300
commit546742e5e8544fb42aa65744d719100b5e32dee4 (patch)
tree2d3ccd186b8ccb02cd134af845cc41aa04e1ff00 /debian/sudo-ldap.preinst
downloadsudo-debian.tar.gz
Imported sudo 1.8.19p1-2.1debian/1.8.19p1-2.1debian
Diffstat (limited to 'debian/sudo-ldap.preinst')
-rw-r--r--debian/sudo-ldap.preinst22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/sudo-ldap.preinst b/debian/sudo-ldap.preinst
new file mode 100644
index 0000000..9a39d94
--- /dev/null
+++ b/debian/sudo-ldap.preinst
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+case "$1" in
+ install|upgrade)
+ if [ -n "$2" ] && dpkg --compare-versions "$2" le "1.7.4p4-4"; then
+
+ SUDOERS="/etc/sudoers"
+
+ if [ -e "$SUDOERS" ]; then
+ md5sum="$(md5sum $SUDOERS | sed -e 's/ .*//')"
+ if [ "$md5sum" = "c310ef4892a00cca8134f6e4fcd64b6d" ] || #lenny
+ [ "$md5sum" = "c5dab0f2771411ed7e67d6dab60a311f" ] || #squeeze
+ [ "$md5sum" = "45437b4e86fba2ab890ac81db2ec3606" ]; then #wheezy
+ # move unchanged sudoers file to avoid conffile question
+ mv "$SUDOERS" "$SUDOERS.pre-conffile"
+ fi
+ fi
+ fi
+ ;;
+esac
+
+#DEBHELPER#