#!/bin/sh
set -e

case "$1" in
    remove)
        # Disable plymouth theme
        update-alternatives \
            --remove default.plymouth /usr/share/plymouth/themes/edubuntu-logo/edubuntu-logo.plymouth
        update-alternatives \
            --remove text.plymouth /usr/share/plymouth/themes/edubuntu-text/edubuntu-text.plymouth

        if which update-initramfs >/dev/null 2>&1
        then
            update-initramfs -u
        fi
        if id -u gdm >/dev/null 2>&1; then
            sudo -u gdm dbus-launch gsettings set \
              org.gnome.login-screen logo '/usr/share/plymouth/ubuntu-logo.png' || true
        fi
        if command -v update-grub >/dev/null 2>&1; then
            update-grub
        fi
    ;;
esac

#DEBHELPER#
