prerm is in sendmail-base 8.15.2-10.
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #!/bin/sh
set -e;
PACKAGE=sendmail-base;
if [ "$1" = "remove" ]; then
if [ -x /usr/sbin/update-inetd ]; then
update-inetd --group MAIL --disable smtp,smtps,submission;
fi;
# Make sure /etc/aliases is left (move it from /etc/mail if needed)
if [ -L /etc/mail/aliases ]; then
rm -f /etc/mail/aliases;
elif [ -f /etc/mail/aliases ] \
&& [ -L /etc/aliases ]; then
mv /etc/mail/aliases /etc/aliases;
fi;
# Remove pseudo conffiles (managed by sendmail)
rm -f /etc/cron.d/sendmail;
# Remove files scattered across the system that
# happened to be created by sendmail
rm -f /usr/lib/sasl/Sendmail.conf
# Remove those files created by sendmail
rm -rf /var/lib/sendmail;
rm -rf /var/run/sendmail;
# Note: syslog really owns these files
#rm -f /var/log/mail/*;
#rm -f /var/log/mail.log;
# Note: these can lead to a loss of mail!!!!
if [ -x /etc/init.d/sendmail ]; then
/etc/init.d/sendmail clean;
fi;
if [ -L /var/spool/mqueue ]; then
rmdir --ignore-fail-on-non-empty \
`readlink -fn /var/spool/mqueue`;
elif [ -d /var/spool/mqueue ]; then
rmdir --ignore-fail-on-non-empty \
/var/spool/mqueue;
fi;
if [ -L /var/spool/mqueue-client ]; then
rmdir --ignore-fail-on-non-empty \
`readlink -fn /var/spool/mqueue-client`;
elif [ -d /var/spool/mqueue-client ]; then
rmdir --ignore-fail-on-non-empty \
/var/spool/mqueue-client;
fi;
# Remove sendmail built configuration files
rm -f /etc/mail/*.db \
/etc/mail/*.dir \
/etc/mail/*.pag;
rm -f /etc/mail/sendmail.cf \
/etc/mail/sendmail.cf.old \
/etc/mail/sendmail.cf.errors \
/etc/mail/sendmail.mc.old \
/etc/mail/submit.cf \
/etc/mail/submit.cf.errors \
/etc/mail/submit.mc.old \
/etc/mail/databases \
/etc/mail/Makefile \
;
rm -rf /etc/mail/smrsh \
/etc/mail/sasl \
/etc/mail/tls;
# Remove empty files (probably touched databases)
find /etc/mail -maxdepth 1 -size 0 | xargs -r rm;
fi
if [ "$1" = "upgrade" ]; then
# Potentially move the old configuration file to the new name -
# before it gets deleted (for not existing in the new package)
mv -f /etc/default/sendmail \
/etc/mail/sendmail.conf 2>/dev/null || true;
# Prevent cronjob from running during upgrade...
if [ -f /etc/cron.d/sendmail ]; then
echo "#prerm" > /etc/cron.d/sendmail;
fi;
fi
# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper rm_conffile /etc/dhcp3/dhclient-exit-hooks.d/sendmail 8.14.4-2.2\~ -- "$@"
# End automatically added section
|