source: projects/initscripts/tags/initscripts-8.91.3/prefdm @ 3072

Revision 3072, 1.4 KB checked in by daisuke, 13 years ago (diff)

tagging as initscripts-8.91.3

RevLine 
[1108]1#!/bin/sh
2
3PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
4
5# We need to source this so that the login screens get translated
6. /etc/profile.d/lang.sh
7
8# Run preferred X display manager
9
10preferred=
11quit_arg=
12if [ -f /etc/sysconfig/dmtype ]; then
13        if grep -q gdm /etc/sysconfig/dmtype 2>/dev/null; then
14                preferred=gdm
15        elif grep -q lxdm /etc/sysconfig/dmtype 2>/dev/null; then
16                preferred=lxdm
17        elif grep -q -e kdm -e kdm2 -e kde -e kde2 /etc/sysconfig/dmtype 2>/dev/null; then
18                preferred=kdm
19        elif grep -q wdm /etc/sysconfig/dmtype 2>/dev/null; then
20                preferred=wdm
21        elif grep -q xdm /etc/sysconfig/dmtype 2>/dev/null; then
22                preferred=xdm
23        fi
24fi
25
26if [ -z "$preferred" ]; then
27        if which gdm >/dev/null 2>&1; then
28                preferred=gdm
29        elif which lxdm >/dev/null 2>&1; then
30                preferred=lxdm
31        elif which kdm >/dev/null 2>&1; then
32                preferred=kdm
33        elif which wdm >/dev/null 2>&1; then
34                preferred=wdm
35        elif which xdm >/dev/null 2>&1; then
36                preferred=xdm
37        fi
38fi
39
40# shut down boot splash
[2969]41[ -x /usr/bin/plymouth ] && /usr/bin/plymouth quit
[1108]42
43if [ -n "$preferred" ] && which $preferred >/dev/null 2>&1; then
44        exec `which $preferred` $* >/dev/null 2>&1
45fi
46
47if which gdm >/dev/null 2>&1; then
48        exec `which gdm` $* >/dev/null 2>&1
49elif which lxdm >/dev/null 2>&1; then
50        exec `which lxdm` $* >/dev/null 2>&1
51elif which kdm >/dev/null 2>&1; then
52        exec `which kdm` $* >/dev/null 2>&1
53elif which xdm >/dev/null 2>&1; then
54        exec `which xdm` $* >/dev/null 2>&1
55fi
56
57# catch all exit error
58exit 1
Note: See TracBrowser for help on using the repository browser.