1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/X11/startxdm,v 1.4 2005-07-02 17:08:33 niro Exp $ |
3 |
|
|
4 |
source /etc/profile |
source /etc/profile |
5 |
source /etc/rc.config |
source /etc/rc.config |
6 |
|
|
7 |
|
# enable antialias by default for gnome |
8 |
|
export GDK_USE_XFT=1 |
9 |
|
|
10 |
get_login() { |
get_login() { |
11 |
case "$GLOGIN" in |
case "${GLOGIN}" in |
12 |
kdm|KDM) |
kdm|KDM) |
13 |
GLOGINCMD="$(which kdm 2> /dev/null)" |
GLOGINCMD="$(which kdm 2> /dev/null)" |
14 |
if [ ! -f "${GLOGINCMD}" ] |
if [ ! -f "${GLOGINCMD}" ] |
17 |
exit 1 |
exit 1 |
18 |
fi |
fi |
19 |
;; |
;; |
20 |
|
|
21 |
xdm|XDM) |
xdm|XDM) |
22 |
GLOGINCMD="$(which xdm 2> /dev/null)" |
GLOGINCMD="$(which xdm 2> /dev/null)" |
23 |
if [ ! -f "${GLOGINCMD}" ] |
if [ ! -f "${GLOGINCMD}" ] |
26 |
exit 1 |
exit 1 |
27 |
fi |
fi |
28 |
;; |
;; |
29 |
|
|
30 |
*) |
*) |
31 |
GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)" |
GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)" |
32 |
if [ ! -e "${GLOGINCMD}" ] |
if [ ! -e "${GLOGINCMD}" ] |
35 |
exit 1 |
exit 1 |
36 |
fi |
fi |
37 |
;; |
;; |
38 |
|
|
39 |
esac |
esac |
40 |
} |
} |
41 |
|
|
42 |
|
|
43 |
if [ -n "$GLOGIN" ] |
if [ -n "${GLOGIN}" ] |
44 |
then |
then |
45 |
get_login |
get_login |
46 |
/sbin/start-stop-daemon --start --quiet --exec ${GLOGINCMD} |
/sbin/start-stop-daemon --start --quiet --exec ${GLOGINCMD} |
47 |
retval="$?" |
retval="$?" |
48 |
sleep 5 |
wait; sleep 2 |
49 |
|
|
50 |
if [ "${retval}" -ne 0 ] |
if [ "${retval}" -ne 0 ] |
51 |
then |
then |
52 |
echo "Couln't start your Displaymanager" |
echo "Could not start your Displaymanager" |
53 |
killall -9 ${GLOGIN##*/} |
killall -9 ${GLOGIN##*/} |
54 |
fi |
fi |
55 |
fi |
fi |