#! /bin/sh
# /etc/init.d/xdebconfigurator
#
# chkconfig: 2345 52 78
# description: Genererate xfree86 configuration at boot time

set -e

ENABLE_AT_BOOT=
XDEBCFG_ARGS=

if [ -f /etc/default/xdebconfigurator ] ; then
    . /etc/default/xdebconfigurator
fi

do_start() {
    if [ true = "$ENABLE_AT_BOOT" ] ; then
	logger -p user.info -t xdebconfigurator \
	    "Generating new XFree86 config file."
	echo "Generating XFree86 config file using xdebconfigurator/dexconf."
	# Should use base-config fragment instead
	xdebconfigurator $XDEBCFG_ARGS
	dexconf
    fi
}

case "$1" in
    start)
        do_start
        ;;
    stop|restart|force-reload|status)
        ;;
    *)
        echo $"Usage: $0 {start|stop|restart|force-reload|status}"
        exit 2
        ;;
esac
exit 0
