aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/fndSession
blob: f4f1c1d91e4e9c6cdab82fdaf128ae47b024c3fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#---------------------------------------------------------------
# Project         : Mandriva Linux
# Module          : sbin
# File            : fndSession
# Version         : $Id: fndSession 243102 2008-06-30 13:10:12Z fcrozat $
# Author          : Frederic Lepied
# Created On      : Mon May 30 10:43:12 2005
# Purpose         : find sessions for display managers
#---------------------------------------------------------------

umask 022

FILES=`/bin/ls /usr/share/X11/dm.d/*.conf 2> /dev/null`

if [ $? != 0 ]; then
	exit 0
fi

for f in $FILES; do
    EXEC=
    FNDSESSION_EXEC=
    eval `grep 'EXEC=' "$f"`
    if [ -x "$EXEC" -a -n "$FNDSESSION_EXEC" ]; then
	$FNDSESSION_EXEC
    fi
done

# fndSession ends here