summaryrefslogtreecommitdiff
path: root/openembedded/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm
blob: b2c4cf1558f2f82bf2e2bb026293f406b7a01c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

killproc() {            # kill the named process(es)
        pid=`/bin/ps -e x |
             /bin/grep $1 |
             /bin/grep -v grep |
             /bin/sed -e 's/^  *//' -e 's/ .*//'`
        [ "$pid" != "" ] && kill $pid
}

case "$1" in
  start)
       echo "Starting Xserver"
       /etc/X11/Xserver &
       export DISPLAY=:0
	       
       while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ]
       do
               /usr/bin/xtscal
       done

       /etc/X11/Xsession &
  ;;

  stop)
        echo "Stopping XServer"
        killproc Xfbdev
	killproc Xomap
	killproc Xorg
	killproc Xepson
  ;;

  *)
        echo "usage: $0 { start | stop }"
  ;;
esac

exit 0