Magellan Linux

Annotation of /trunk/xorg/xdm.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1191 - (hide annotations) (download)
Thu Nov 18 18:56:55 2010 UTC (13 years, 11 months ago) by niro
File size: 2245 byte(s)
added alx patches for xorg-7.5.0
1 niro 28 #!/bin/bash
2 niro 732 # $Header: /root/magellan-cvs/src/xorg/xdm.rc,v 1.3 2008-12-26 02:04:07 niro Exp $
3 niro 28
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 niro 732 source /etc/conf.d/rc
14 niro 28 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 niro 1191 rc_echo "Failure: KDE Login Manager not found."
33 niro 28 exit 1
34     fi
35     ;;
36 niro 62
37 niro 28 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 niro 1191 rc_echo "Failure: GNOME Login Manager not found."
47 niro 28 exit 1
48     fi
49     ;;
50 niro 62
51     entrance*|ENTRANCE*)
52     GLOGINCMD="$(which entranced 2> /dev/null)"
53     if [ ! -f "${GLOGINCMD}" ]
54     then
55 niro 1191 rc_echo "Failure: Enlightenment Login Manager not found."
56 niro 62 exit 1
57     fi
58     ;;
59    
60     wdm|WDM)
61     GLOGINCMD="$(which wdm 2> /dev/null)"
62     if [ ! -f "${GLOGINCMD}" ]
63     then
64 niro 1191 rc_echo "Failure: Windowmaker Login Manager not found."
65 niro 62 exit 1
66     fi
67     ;;
68    
69 niro 28 xdm|XDM)
70     GLOGINCMD="$(which xdm 2> /dev/null)"
71     if [ ! -f "${GLOGINCMD}" ]
72     then
73 niro 1191 rc_echo "Failure: XDM Login Manager not found."
74 niro 28 exit 1
75     fi
76     ;;
77 niro 62
78 niro 28 *)
79     GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)"
80     if [ ! -f "${GLOGINCMD}" ]
81     then
82 niro 1191 rc_echo "Failure: \"${GLOGIN}\" Login Manager not found."
83 niro 28 exit 1
84     fi
85 niro 62 ;;
86 niro 28 esac
87     }
88    
89     case "${XDM_OPT}" in
90     start)
91     get_login
92 niro 1191 rc_print "Starting ${GLOGIN} ..."
93 niro 28 /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 niro 1191 rc_print "Stopping ${GLOGIN} ..."
104 niro 28
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 niro 1191 rc_echo "Usage: $0 {start|stop|restart|status}"
125 niro 28 exit 1
126     ;;
127     esac

Properties

Name Value
svn:executable *