#!/bin/sh
# postinst script for usplash-theme-ubuntume

set -e

case "$1" in
    configure)

      if update-alternatives --display usplash-artwork.so | grep "link currently points to /usr/lib/usplash/usplash-theme-ubuntume.so" > /dev/null 2>&1 ; then
        update-initramfs -u
      else
        update-alternatives --install /usr/lib/usplash/usplash-artwork.so usplash-artwork.so /usr/lib/usplash/usplash-theme-ubuntume.so 10
      fi

      if [ ! -z $2 ] && [ "$2" \< "1.3" ] ; then
        if update-alternatives --display usplash-artwork.so | grep "link currently points to /usr/lib/usplash/ubuntume.so" > /dev/null 2>&1 ; then
          update-alternatives --set usplash-artwork.so /usr/lib/usplash/usplash-theme-ubuntume.so
          update-initramfs -u
        fi
        update-alternatives --remove usplash-artwork.so /usr/lib/usplash/ubuntume.so
      fi
    ;;

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

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

#DEBHELPER#

exit 0


