# the debian-policy package
if [ "$1" = install -o "$1" = upgrade ]; then
- if [ -L /etc/init.d/amavis -a -f /etc/init.d/amavis.amavisd-new ]; then
+ if [ -f /etc/init.d/amavisd-cn ]; then
+ rm -f /etc/init.d/amavisd-cn
+ fi
+ if [ -L /etc/init.d/amavis ]; then
rm -f /etc/init.d/amavis
+ fi
+ if [ -f /etc/init.d/amavis.amavisd-new ]; then
dpkg-divert --quiet --package amavisd-cn --remove --rename \
--divert /etc/init.d/amavis.amavisd-new /etc/init.d/amavis || true
update-rc.d amavis defaults 19 21 >/dev/null || true