Contents of /trunk/xorg/xdm.rc
Parent Directory | Revision Log
Revision 1191 -
(show annotations)
(download)
Thu Nov 18 18:56:55 2010 UTC (13 years, 10 months ago) by niro
File size: 2245 byte(s)
Thu Nov 18 18:56:55 2010 UTC (13 years, 10 months ago) by niro
File size: 2245 byte(s)
added alx patches for xorg-7.5.0
1 | #!/bin/bash |
2 | # $Header: /root/magellan-cvs/src/xorg/xdm.rc,v 1.3 2008-12-26 02:04:07 niro Exp $ |
3 | |
4 | #%rlevels: 5:s 0:k 1:k 2:k 3:k 4:k 6:k |
5 | #%start: 95 |
6 | #%stop: 05 |
7 | |
8 | #deps |
9 | #%needs: |
10 | #%before: |
11 | #%after: |
12 | |
13 | source /etc/conf.d/rc |
14 | source $rc_functions |
15 | source /etc/rc.config |
16 | source /etc/profile |
17 | |
18 | if [ -z ${GLOGIN} ] |
19 | then |
20 | echo "You have to declare \"GLOGIN\" in /etc/rc.conf !" |
21 | exit 1 |
22 | fi |
23 | |
24 | XDM_OPT=$1 |
25 | |
26 | get_login() { |
27 | case "$GLOGIN" in |
28 | kdm|KDM) |
29 | GLOGINCMD="$(which kdm 2> /dev/null)" |
30 | if [ ! -f "${GLOGINCMD}" ] |
31 | then |
32 | rc_echo "Failure: KDE Login Manager not found." |
33 | exit 1 |
34 | fi |
35 | ;; |
36 | |
37 | gdm|GDM) |
38 | if [[ ${XDM_OPT} = stop ]] |
39 | then |
40 | GLOGINCMD="$(which gdm-binary 2> /dev/null)" |
41 | else |
42 | GLOGINCMD="$(which gdm 2> /dev/null)" |
43 | fi |
44 | if [ ! -f "${GLOGINCMD}" ] |
45 | then |
46 | rc_echo "Failure: GNOME Login Manager not found." |
47 | exit 1 |
48 | fi |
49 | ;; |
50 | |
51 | entrance*|ENTRANCE*) |
52 | GLOGINCMD="$(which entranced 2> /dev/null)" |
53 | if [ ! -f "${GLOGINCMD}" ] |
54 | then |
55 | rc_echo "Failure: Enlightenment Login Manager not found." |
56 | exit 1 |
57 | fi |
58 | ;; |
59 | |
60 | wdm|WDM) |
61 | GLOGINCMD="$(which wdm 2> /dev/null)" |
62 | if [ ! -f "${GLOGINCMD}" ] |
63 | then |
64 | rc_echo "Failure: Windowmaker Login Manager not found." |
65 | exit 1 |
66 | fi |
67 | ;; |
68 | |
69 | xdm|XDM) |
70 | GLOGINCMD="$(which xdm 2> /dev/null)" |
71 | if [ ! -f "${GLOGINCMD}" ] |
72 | then |
73 | rc_echo "Failure: XDM Login Manager not found." |
74 | exit 1 |
75 | fi |
76 | ;; |
77 | |
78 | *) |
79 | GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)" |
80 | if [ ! -f "${GLOGINCMD}" ] |
81 | then |
82 | rc_echo "Failure: \"${GLOGIN}\" Login Manager not found." |
83 | exit 1 |
84 | fi |
85 | ;; |
86 | esac |
87 | } |
88 | |
89 | case "${XDM_OPT}" in |
90 | start) |
91 | get_login |
92 | rc_print "Starting ${GLOGIN} ..." |
93 | /sbin/telinit a |
94 | evaluate_retval |
95 | |
96 | update_svcstatus $1 |
97 | splash svc_started "$(basename $0)" 0 |
98 | ;; |
99 | stop) |
100 | get_login |
101 | if [ -n "$(ps -A|grep $(basename ${GLOGINCMD}))" ] |
102 | then |
103 | rc_print "Stopping ${GLOGIN} ..." |
104 | |
105 | CUR_VT=$(fgconsole) |
106 | start-stop-daemon --stop --quiet --exe ${GLOGINCMD} |
107 | evaluate_retval |
108 | chvt ${CUR_VT} |
109 | fi |
110 | update_svcstatus $1 |
111 | splash svc_stopped "$(basename $0)" 0 |
112 | ;; |
113 | |
114 | restart) |
115 | $0 stop |
116 | sleep 1 |
117 | $0 start |
118 | ;; |
119 | status) |
120 | get_login |
121 | statusproc ${GLOGINCMD} |
122 | ;; |
123 | *) |
124 | rc_echo "Usage: $0 {start|stop|restart|status}" |
125 | exit 1 |
126 | ;; |
127 | esac |
Properties
Name | Value |
---|---|
svn:executable | * |