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

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <postinst> `abort-remove'
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

#DEBHELPER#

case "$1" in
    configure)

	# desktop-background
	update-alternatives --install /usr/share/images/desktop-base/desktop-background desktop-background \
	  /usr/share/images/desktop-base/desktop-dkn-background.svg 99

	# grub background
	update-alternatives --install /usr/share/images/desktop-base/desktop-grub.png desktop-grub \
	  /usr/share/images/desktop-base/desktop-dkn-grub.png 99

	# desktop-splash - not used for lightdm? 
	update-alternatives --install /usr/share/images/desktop-base/desktop-splash desktop-splash \
	  /usr/share/images/desktop-base/login-dkn-background.svg 99 

	# update grub if installed
	which update-grub2 && update-grub2
    ;;

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

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

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.


exit 0
