Adding XOrg init skript.

git-svn-id: svn://svn.openwrt.org/openwrt/packages@11495 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
ryd 2008-06-15 22:01:28 +00:00
parent 5e6a267f6d
commit 1d73e080ac
2 changed files with 25 additions and 0 deletions

View 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))

View File

@ -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"
}