Magellan Linux

Annotation of /alx-src/trunk/tinyalxconfig-ng/init.d/xdm-alx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 386 - (hide annotations) (download)
Wed Jun 4 16:47:56 2008 UTC (15 years, 11 months ago) by niro
File size: 1160 byte(s)
-initial import

1 niro 386 #!/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/tinyalxconfig-ng/init.d/xdm-alx,v 1.1 2008-06-04 16:47:56 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     CUR_VT=$(fgconsole)
34     start-stop-daemon --stop --exec /usr/X11R6/bin/xinit
35     evaluate_retval
36     chvt ${CUR_VT}
37     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