diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2007-02-15 10:58:00 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2007-02-15 10:58:00 +0000 |
commit | b36aaa0e6238f8a966561edb444f4661e84b801d (patch) | |
tree | 45410f790eba151dcab5ac736b82a8465002295e /packages/xserver-kdrive-common/xserver-nodm-init | |
parent | c34cbde492b6c7720a5a315f2d98c3240f7055b8 (diff) | |
parent | 543055f847be4ac652a340298b5abe21a93cc769 (diff) |
merge of '414cac1c77ff9fa2877bf185b1fb201f034ee108'
and 'bf8b52c7c7ffdfe7cb88423cc23d4eeb9c573c2f'
Diffstat (limited to 'packages/xserver-kdrive-common/xserver-nodm-init')
-rw-r--r-- | packages/xserver-kdrive-common/xserver-nodm-init/.mtn2git_empty | 0 | ||||
-rwxr-xr-x | packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm | 49 |
2 files changed, 49 insertions, 0 deletions
diff --git a/packages/xserver-kdrive-common/xserver-nodm-init/.mtn2git_empty b/packages/xserver-kdrive-common/xserver-nodm-init/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/xserver-kdrive-common/xserver-nodm-init/.mtn2git_empty diff --git a/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm b/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm new file mode 100755 index 0000000000..a56edaa15b --- /dev/null +++ b/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm @@ -0,0 +1,49 @@ +#!/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 +} + +for x in $(cat /proc/cmdline); do + case $x in + x11=false) + echo "X Server disabled" + exit 0; + ;; + esac +done + +case "$1" in + start) + # We don't want this script to block the rest of the boot process + if [ "$2" != "background" ]; then + $0 $1 background & + else + . /etc/profile + + echo "Starting Xserver" + /etc/X11/Xserver & + fi + ;; + + stop) + echo "Stopping XServer" + killproc xinit + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 |