#!/bin/sh
# fndSession (c) MandrakeSoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>
## FindSession for kdm and gdm.

[ -x /usr/sbin/chksession ] || {
    echo "I can't find /usr/sbin/chksession"
    echo "check your installation"
    exit 1
}

if [ -e /usr/share/config/kdm/kdmrc ];then
LIST="`/usr/sbin/chksession -k`" perl -pi -e 's|^SessionTypes=.*|$ENV{LIST}|'\
    /usr/share/config/kdm/kdmrc
fi

if [ -d /etc/X11/gdm/Sessions ];then
	/usr/sbin/chksession -g
fi
