preinst is in sudo 1.8.16-0ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/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
# remove the old init script
dpkg-maintscript-helper rm_conffile /etc/init.d/sudo 1.8.12-1ubuntu2~ sudo -- "$@"
|