Contents of /alx-src/trunk/alxconfig-ng/init.d/xdm-alx
Parent Directory | Revision Log
Revision 239 -
(show annotations)
(download)
Tue Apr 12 20:46:52 2005 UTC (19 years, 1 month ago) by niro
File size: 1115 byte(s)
Tue Apr 12 20:46:52 2005 UTC (19 years, 1 month ago) by niro
File size: 1115 byte(s)
import from aka-cvs
1 | #!/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 | # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/xdm-alx,v 1.2 2005-04-12 20:45:55 niro Exp $ |
13 | |
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 | start-stop-daemon --stop --exec /usr/X11R6/bin/xinit |
34 | evaluate_retval |
35 | else |
36 | # process not running; print a message |
37 | print_status warning not_running |
38 | fi |
39 | [ -f /var/run/X-no-wm.pid ] && rm /var/run/X-no-wm.pid |
40 | update_svcstatus $1 |
41 | splash svc_stopped "$(basename $0)" 0 |
42 | ;; |
43 | |
44 | restart) |
45 | $0 stop |
46 | sleep 1 |
47 | $0 start |
48 | ;; |
49 | |
50 | status) |
51 | statusproc xinit |
52 | ;; |
53 | |
54 | *) |
55 | echo "Usage: $0 {start|stop|restart|status}" |
56 | exit 1 |
57 | ;; |
58 | esac |