Annotation of /alx-src/tags/alxconf_20060908_11/init.d/xdm-alx
Parent Directory | Revision Log
Revision 543 -
(hide annotations)
(download)
Wed Feb 4 19:51:39 2009 UTC (15 years, 7 months ago) by niro
Original Path: alx-src/branches/alxconf_20060908/alxconfig-ng/init.d/xdm-alx
File size: 1156 byte(s)
Wed Feb 4 19:51:39 2009 UTC (15 years, 7 months ago) by niro
Original Path: alx-src/branches/alxconf_20060908/alxconfig-ng/init.d/xdm-alx
File size: 1156 byte(s)
- created alxconf_20060908 branch for the stable-050 alx based on tag alxconf_20060908_1
1 | niro | 224 | #!/bin/bash |
2 | |||
3 | #%rlevels: 5:s 0:k 1:k 2:k 3:k 4:k 6:k | ||
4 | #%start: 95 | ||
5 | #%stop: 05 | ||
6 | |||
7 | #deps | ||
8 | #%needs: | ||
9 | #%before: | ||
10 | #%after: | ||
11 | |||
12 | niro | 247 | # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/xdm-alx,v 1.3 2005-04-13 16:10:54 niro Exp $ |
13 | niro | 224 | |
14 | source /etc/sysconfig/rc | ||
15 | source $rc_functions | ||
16 | |||
17 | case $1 in | ||
18 | start) | ||
19 | echo -e ${COLOREDSTAR}"Starting single X11 session ..." | ||
20 | start-stop-daemon --start --background \ | ||
21 | --make-pidfile /var/run/X-no-wm.pid \ | ||
22 | --pidfile /var/run/X-no-wm.pid \ | ||
23 | --exec /usr/sbin/X-no-wm | ||
24 | evaluate_retval | ||
25 | update_svcstatus $1 | ||
26 | splash svc_started "$(basename $0)" 0 | ||
27 | ;; | ||
28 | |||
29 | stop) | ||
30 | echo -e ${COLOREDSTAR}"Stopping single X11 session ..." | ||
31 | if [ -n "$(pidof xinit)" ] | ||
32 | then | ||
33 | niro | 247 | CUR_VT=$(fgconsole) |
34 | niro | 224 | start-stop-daemon --stop --exec /usr/X11R6/bin/xinit |
35 | evaluate_retval | ||
36 | niro | 247 | chvt ${CUR_VT} |
37 | niro | 224 | else |
38 | # process not running; print a message | ||
39 | print_status warning not_running | ||
40 | fi | ||
41 | [ -f /var/run/X-no-wm.pid ] && rm /var/run/X-no-wm.pid | ||
42 | update_svcstatus $1 | ||
43 | splash svc_stopped "$(basename $0)" 0 | ||
44 | ;; | ||
45 | |||
46 | restart) | ||
47 | $0 stop | ||
48 | sleep 1 | ||
49 | $0 start | ||
50 | ;; | ||
51 | |||
52 | status) | ||
53 | statusproc xinit | ||
54 | ;; | ||
55 | |||
56 | *) | ||
57 | echo "Usage: $0 {start|stop|restart|status}" | ||
58 | exit 1 | ||
59 | ;; | ||
60 | esac |