49 lines
876 B
Bash
Executable File
49 lines
876 B
Bash
Executable File
#!/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)
|
|
# 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 &
|
|
|
|
export DISPLAY=:0
|
|
|
|
while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ]
|
|
do
|
|
/usr/bin/xtscal
|
|
done
|
|
|
|
/etc/X11/Xsession &
|
|
fi
|
|
;;
|
|
|
|
stop)
|
|
echo "Stopping XServer"
|
|
killproc Xfbdev
|
|
killproc Xomap
|
|
killproc Xorg
|
|
killproc Xepson
|
|
;;
|
|
|
|
*)
|
|
echo "usage: $0 { start | stop }"
|
|
;;
|
|
esac
|
|
|
|
exit 0
|