Adding XOrg init skript.
authorJens Muecke <jens@nons.de>
Sun, 15 Jun 2008 22:01:28 +0000 (22:01 +0000)
committerJens Muecke <jens@nons.de>
Sun, 15 Jun 2008 22:01:28 +0000 (22:01 +0000)
SVN-Revision: 11495

XOrg/meta/xorg-server-essentials/Makefile
XOrg/meta/xorg-server-essentials/files/xorg.init [new file with mode: 0644]

index 14d0f2bff419d62829adc4c5a822af858e88eb6c..7b945ec2f3484d5c07b097d527f8429f182ded30 100644 (file)
@@ -43,6 +43,8 @@ endef
 define Package/xorg-server-essentials/install
        $(INSTALL_DIR) $(1)/root
        $(CP) files/xinitrc $(1)/root/.xinitrc
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) files/xorg.init $(1)/etc/init.d/xorg
 endef
 
 $(eval $(call BuildPackage,xorg-server-essentials))
diff --git a/XOrg/meta/xorg-server-essentials/files/xorg.init b/XOrg/meta/xorg-server-essentials/files/xorg.init
new file mode 100644 (file)
index 0000000..bc56b92
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+SSD=start-stop-daemon
+PIDF=/var/run/xorg.pid
+PROG=/usr/bin/startx
+ARGS=
+
+START=90
+start() {
+       . /etc/profile
+       mkdir -p /var/run/xorg
+       $SSD -S -p $PIDF -q -x $PROG -- $ARGS 
+}
+
+stop() {
+       killall X
+}
+
+status() {
+        ps | grep -q "^ *$(cat $PIDF 2>/dev/null) *.*$PROG"
+}
+