summaryrefslogtreecommitdiffstats
path: root/meta/packages/x11-common/xserver-nodm-init/xserver-nodm
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/x11-common/xserver-nodm-init/xserver-nodm')
-rwxr-xr-xmeta/packages/x11-common/xserver-nodm-init/xserver-nodm51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/packages/x11-common/xserver-nodm-init/xserver-nodm b/meta/packages/x11-common/xserver-nodm-init/xserver-nodm
new file mode 100755
index 0000000000..f6399fc1fa
--- /dev/null
+++ b/meta/packages/x11-common/xserver-nodm-init/xserver-nodm
@@ -0,0 +1,51 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: xserver
5# Required-Start: $local_fs $remote_fs dbus
6# Required-Stop: $local_fs $remote_fs
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9### END INIT INFO
10
11killproc() { # kill the named process(es)
12 pid=`/bin/pidof $1`
13 [ "$pid" != "" ] && kill $pid
14}
15
16read CMDLINE < /proc/cmdline
17for x in $CMDLINE; do
18 case $x in
19 x11=false)
20 echo "X Server disabled"
21 exit 0;
22 ;;
23 esac
24done
25
26case "$1" in
27 start)
28 . /etc/profile
29 echo "Starting Xserver"
30 /etc/X11/Xserver &
31 # Wait for the desktop to say its finished loading
32 dbus-wait org.matchbox_project.desktop Loaded
33 ;;
34
35 stop)
36 echo "Stopping XServer"
37 killproc xinit
38 ;;
39
40 restart)
41 $0 stop
42 sleep 1
43 $0 start
44 ;;
45
46 *)
47 echo "usage: $0 { start | stop | restart }"
48 ;;
49esac
50
51exit 0