summaryrefslogtreecommitdiffstats
path: root/debian/sudo.preinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:52:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:52:13 +0000
commitaf28b3fc7bdc38f942b8b641e7a95223443e0eab (patch)
tree9134309de0bda5a19b41aec8e1ef27272f79d958 /debian/sudo.preinst
parentAdding upstream version 1.9.5p2. (diff)
downloadsudo-af28b3fc7bdc38f942b8b641e7a95223443e0eab.tar.xz
sudo-af28b3fc7bdc38f942b8b641e7a95223443e0eab.zip
Adding debian version 1.9.5p2-3+deb11u1.debian/1.9.5p2-3+deb11u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/sudo.preinst')
-rw-r--r--debian/sudo.preinst22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/sudo.preinst b/debian/sudo.preinst
new file mode 100644
index 0000000..9a39d94
--- /dev/null
+++ b/debian/sudo.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#