#!/bin/sh
# postinst script
# see: dh_installdeb(1)

set -e


case "$1" in
    configure|upgrade|update|reconfigure)
	# Remove settings from old debian-plymouth-manager
	sed 's/^ *//; s/ *$//' /etc/initramfs-tools/modules -i
	sed 's/^uvesafb$//g' /etc/initramfs-tools/modules -i
	sed 's/^vga16fb$//g' /etc/initramfs-tools/modules -i
	sed '/^$/d' /etc/initramfs-tools/modules -i
	rm -f /etc/modprobe.d/uves*.conf

	if [ -f /usr/lib/debian-plymouth-manager/debian-plymouth-manager.conf ]; then
	  rm /usr/lib/debian-plymouth-manager/debian-plymouth-manager.conf
	fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

exit 0


