prerm is in sendmail-bin 8.15.2-3.
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 24 25 26 27 28 29 30 31 32 33 34 35 36 | #!/bin/sh
set -e;
PACKAGE=sendmail-bin;
if [ "$1" = "remove" ]; then
# Remove alternatives for MTA, MSP
update-alternatives --remove sendmail-mta /usr/lib/sm.bin/sendmail;
update-alternatives --remove sendmail-msp /usr/lib/sm.bin/sendmail;
if [ -x /etc/init.d/sendmail ] && \
[ -x /usr/share/sendmail/sendmail ]; then
invoke-rc.d --quiet --force sendmail stop
fi;
# Prevent cronjob from running during upgrade...
if [ -f /etc/cron.d/sendmail ]; then
rm -f /etc/cron.d/sendmail;
fi;
fi
if [ "$1" = "upgrade" ]; then
# Prevent cronjob from running during upgrade...
if [ -f /etc/cron.d/sendmail ]; then
echo "#prerm" > /etc/cron.d/sendmail;
fi;
# NOTE NOTE NOTE NOTE NOTE
# If we fall through to DEBHELPER, sendmail will be stopped
# much earlier than necessary !!!
exit 0;
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/sendmail" ] || [ -e "/etc/init/sendmail.conf" ]; then
invoke-rc.d sendmail stop || exit $?
fi
# End automatically added section
|