#! /bin/sh
set -e

case "$1" in
    configure)
        # Add plymouth themes
        update-alternatives \
            --install /usr/share/plymouth/themes/default.plymouth default.plymouth \
            /usr/share/plymouth/themes/edubuntu-logo/edubuntu-logo.plymouth 150 \
            --slave /usr/share/plymouth/themes/default.grub default.plymouth.grub \
            /usr/share/plymouth/themes/edubuntu-logo/edubuntu-logo.grub

        update-alternatives \
            --install /usr/share/plymouth/themes/text.plymouth text.plymouth \
            /usr/share/plymouth/themes/edubuntu-text/edubuntu-text.plymouth 60 
        
        update-alternatives \
        --set default.plymouth \
        /usr/share/plymouth/themes/edubuntu-logo/edubuntu-logo.plymouth

        if command -v update-initramfs >/dev/null 2>&1; then
            update-initramfs -u
        fi
        if command -v dconf >/dev/null 2>&1; then
            dconf update
        fi
    ;;

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

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

#DEBHELPER#
