4 |
source /etc/rc.config |
source /etc/rc.config |
5 |
|
|
6 |
get_login() { |
get_login() { |
7 |
case "$GLOGIN" in |
case "${GLOGIN}" in |
8 |
kdm|KDM) |
kdm|KDM) |
9 |
GLOGINCMD="$(which kdm 2> /dev/null)" |
GLOGINCMD="$(which kdm 2> /dev/null)" |
10 |
if [ ! -f "${GLOGINCMD}" ] |
if [ ! -f "${GLOGINCMD}" ] |
13 |
exit 1 |
exit 1 |
14 |
fi |
fi |
15 |
;; |
;; |
16 |
|
|
17 |
xdm|XDM) |
xdm|XDM) |
18 |
GLOGINCMD="$(which xdm 2> /dev/null)" |
GLOGINCMD="$(which xdm 2> /dev/null)" |
19 |
if [ ! -f "${GLOGINCMD}" ] |
if [ ! -f "${GLOGINCMD}" ] |
22 |
exit 1 |
exit 1 |
23 |
fi |
fi |
24 |
;; |
;; |
25 |
|
|
26 |
*) |
*) |
27 |
GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)" |
GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)" |
28 |
if [ ! -e "${GLOGINCMD}" ] |
if [ ! -e "${GLOGINCMD}" ] |
31 |
exit 1 |
exit 1 |
32 |
fi |
fi |
33 |
;; |
;; |
34 |
|
|
35 |
esac |
esac |
36 |
} |
} |
37 |
|
|
38 |
|
|
39 |
if [ -n "$GLOGIN" ] |
if [ -n "${GLOGIN}" ] |
40 |
then |
then |
41 |
get_login |
get_login |
42 |
/sbin/start-stop-daemon --start --quiet --exec ${GLOGINCMD} |
/sbin/start-stop-daemon --start --quiet --exec ${GLOGINCMD} |
43 |
retval="$?" |
retval="$?" |
44 |
sleep 5 |
wait; sleep 2 |
45 |
|
|
46 |
if [ "${retval}" -ne 0 ] |
if [ "${retval}" -ne 0 ] |
47 |
then |
then |