#!/bin/bash

. ${TOOLKIT}-functions.sh


# (MAIN)


if [ -f /etc/init/gdm.conf ]
then
	# upstart system startup
	installfile gdm.conf /etc/init/ root:root 444 || exit $?
else
	# old sysv system startup
	installfile gdm.init /etc/init.d/gdm root:root 555 || exit $?
fi


if getconfirm gdm.force_default
then
	installfile default-display-manager /etc/X11/ root:root 444 || exit $?
fi


# fix bug on 10.* (others too?)
#
chmod a+rx /etc/X11/xinit/xinitrc


# cleanup old stuffs
#
purgefiles /etc/X11/Xsession.d/95ku-x11-user-appls

exit 0
