#! /bin/sh

set -e

# Contrary to configuration files we need to restore the former state
# since our own binaries are removed with a `--remove'.
#
if [ "$1" = "remove" ]
then
    dpkg-divert --package dpkg-multicd --remove --rename \
        --divert /usr/bin/dpkg-scanpackages.dpkg /usr/bin/dpkg-scanpackages
    dpkg-divert --package dpkg-multicd --remove --rename \
        --divert /usr/share/man/man8/dpkg-scanpackages.dpkg.8.gz \
	/usr/share/man/man8/dpkg-scanpackages.8.gz
fi