#!/bin/sh
#
# $FreeBSD: ports/x11/kdebase3/files/kdm.in,v 1.8 2008/08/18 09:22:05 miwi Exp $

# some defs
GENKDMCONF=/usr/local/bin/genkdmconf
KDMCONFDIR=/usr/local/share/config/kdm

#Configure kdm if needed
if [ ! -r ${KDMCONFDIR}/kdmrc ]; then
	echo "Generating KDM configuration";
	${GENKDMCONF} --no-old --in ${KDMCONFDIR};
else
	echo "Updating KDM configuration";
	${GENKDMCONF} --in ${KDMCONFDIR};

fi

#run kdm
exec "/usr/local/bin/kdm-bin" "$@"
