Magellan Linux

Contents of /trunk/mlivecdbuild/profiles/openvpn-i686/custom-files/single-x11.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 582 - (show annotations) (download)
Sat Oct 13 11:42:09 2007 UTC (16 years, 6 months ago) by niro
File size: 1216 byte(s)
-added openvpn profile

1 #!/bin/bash
2 # $Header: /home/cvsd/magellan-cvs/magellan-src/mlivecdbuild/profiles/openvpn-i686/custom-files/single-x11.rc,v 1.1 2007-10-13 11:42:09 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/sysconfig/rc
14 source $rc_functions
15
16 case $1 in
17 start)
18 echo -e ${COLOREDSTAR}"Starting single X11 session ..."
19 start-stop-daemon --start --background \
20 --make-pidfile /var/run/single-x11.pid \
21 --pidfile /var/run/single-x11.pid \
22 --exec /usr/sbin/single-x11
23 evaluate_retval
24
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/single-x11.pid ] && rm /var/run/single-x11.pid
42
43 update_svcstatus $1
44 splash svc_stopped "$(basename $0)" 0
45 ;;
46
47 restart)
48 $0 stop
49 sleep 1
50 $0 start
51 ;;
52
53 status)
54 statusproc xinit
55 ;;
56
57 *)
58 echo "Usage: $0 {start|stop|restart|status}"
59 exit 1
60 ;;
61 esac