From 9a8edcb384c95f46759bae6946ef5b143a8cd36c Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Mon, 30 May 2005 02:41:23 +0000 Subject: use the new framework in /etc/X11/dm.d. --- sbin/fndSession | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'sbin') diff --git a/sbin/fndSession b/sbin/fndSession index 39f8c31..65dbc19 100755 --- a/sbin/fndSession +++ b/sbin/fndSession @@ -1,17 +1,21 @@ #!/bin/sh -# fndSession (c) MandrakeSoft, Chmouel Boudjnah -## FindSession for kdm and gdm. +#--------------------------------------------------------------- +# Project : Mandriva Linux +# Module : sbin +# File : fndSession +# Version : $Id$ +# Author : Frederic Lepied +# Created On : Mon May 30 10:43:12 2005 +# Purpose : find sessions for display managers +#--------------------------------------------------------------- -[ -x /usr/sbin/chksession ] || { - echo "I can't find /usr/sbin/chksession" - echo "check your installation" - exit 1 -} +for f in /etc/X11/dm.d/*.conf; do + EXEC= + FNDSESSION_EXEC= + eval `grep 'EXEC=' "$f"` + if [ -x "$EXEC" -a -n "$FNDSESSION_EXEC" ]; then + $FNDSESSION_EXEC + fi +done -if [ -e /usr/share/config/kdm/kdmrc ];then - /usr/sbin/chksession -k -fi - -if [ -d /etc/X11/dm/Sessions ];then - /usr/sbin/chksession -g -fi +# fndSession ends here -- cgit v1.2.1