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

set -e
wm=kdebase

case "$1" in
    configure)
      if [ -x /usr/sbin/update-alternatives ]; then
        /usr/sbin/update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/kde2 50
      fi
      if test -L /var/spool/kdeapplnk; then
        rm -f /var/spool/kdeapplnk
      fi
      if [ ! -e /usr/share/wallpapers ]; then
        mkdir /usr/share/wallpapers > /dev/null 2>&1
      fi
      if [ -x /usr/bin/X11/mkfontdir ]; then
        /usr/bin/X11/mkfontdir /usr/X11R6/lib/X11/fonts/misc > /dev/null 2>&1
      fi
      if test -x /usr/sbin/wm-menu-config; then wm-menu-config $wm on;fi
    ;;
    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

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

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

#DEBHELPER#

exit 0
