#! /bin/sh

set -e

if [ "$1" = configure ]; then
    update-binfmts --import || true

    if dpkg --compare-versions "$2" lt 2.0.0; then
	rm -rf /var/cache/binfmts
    fi
fi

if [ -e /etc/rc2.d/S20binfmt-support ]; then
    update-rc.d -f binfmt-support remove >/dev/null 2>&1
fi

if [ -e /etc/rc0.d/K90binfmt-support ]; then
    rm -f /etc/rc0.d/K90binfmt-support /etc/rc6.d/K90binfmt-support
fi

#DEBHELPER#

exit 0
