summaryrefslogtreecommitdiffstats
path: root/openembedded
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-02-09 16:05:01 +0000
committerRichard Purdie <richard@openedhand.com>2006-02-09 16:05:01 +0000
commite745d175d9a5a5d7a185885a7ca97bbe5797137b (patch)
treef68ebebb131af8281b81d0f2c882f284739217e0 /openembedded
parentce6bf88ef25fab7f2c36d83a65cad5765051f116 (diff)
downloadpoky-e745d175d9a5a5d7a185885a7ca97bbe5797137b.tar.gz
chkhinge26: Improve the script so its less verbose
git-svn-id: https://svn.o-hand.com/repos/poky@256 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded')
-rwxr-xr-xopenembedded/packages/chkhinge26/chkhinge26_svn.bb2
-rwxr-xr-xopenembedded/packages/chkhinge26/files/hinge-handler19
2 files changed, 15 insertions, 6 deletions
diff --git a/openembedded/packages/chkhinge26/chkhinge26_svn.bb b/openembedded/packages/chkhinge26/chkhinge26_svn.bb
index b265fe6c87..5313401b50 100755
--- a/openembedded/packages/chkhinge26/chkhinge26_svn.bb
+++ b/openembedded/packages/chkhinge26/chkhinge26_svn.bb
@@ -2,7 +2,7 @@ LICENSE = "LGPL"
2SECTION = "x11" 2SECTION = "x11"
3MAINTAINER = "Matthew Allum <mallum@openedhand.com>" 3MAINTAINER = "Matthew Allum <mallum@openedhand.com>"
4DESCRIPTION = "Chkhinge26 fires off cmds on cXXXX Zs." 4DESCRIPTION = "Chkhinge26 fires off cmds on cXXXX Zs."
5PR = "r1" 5PR = "r2"
6 6
7SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=chkhinge26;proto=http \ 7SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=chkhinge26;proto=http \
8 file://hinge-handler" 8 file://hinge-handler"
diff --git a/openembedded/packages/chkhinge26/files/hinge-handler b/openembedded/packages/chkhinge26/files/hinge-handler
index d8100e9b2e..5d5f62e305 100755
--- a/openembedded/packages/chkhinge26/files/hinge-handler
+++ b/openembedded/packages/chkhinge26/files/hinge-handler
@@ -3,6 +3,14 @@
3# Quick handler for chkhinge26 and X. 3# Quick handler for chkhinge26 and X.
4# 4#
5 5
6killproc() { # kill the named process(es)
7 pid=`/bin/ps -e x |
8 /bin/grep $1 |
9 /bin/grep -v grep |
10 /bin/sed -e 's/^ *//' -e 's/ .*//'`
11 [ "$pid" != "" ] && kill $pid
12}
13
6export DISPLAY=:0 14export DISPLAY=:0
7 15
8if [ -z "$1" ]; then 16if [ -z "$1" ]; then
@@ -20,10 +28,10 @@ fi
20 28
21if [ $STATE = "0" ]; then 29if [ $STATE = "0" ]; then
22 echo "lanscape" 30 echo "lanscape"
23 killall mbinputmgr 31 killproc /usr/bin/mbinputmgr
24# urg mbinputmgr should kill below 32# urg mbinputmgr should kill below
25 killall matchbox-keyboard 33 killproc /usr/bin/matchbox-keyboard
26 killall matchbox-stroke 34 killproc /usr/bin/matchbox-stroke
27 xrandr -o normal 35 xrandr -o normal
28 exit 0 36 exit 0
29fi 37fi
@@ -33,6 +41,7 @@ if [ $STATE = "2" ]; then
33 xrandr -o left 41 xrandr -o left
34# just to be extra safe 42# just to be extra safe
35 sleep 1 43 sleep 1
36 mbinputmgr & 44 /usr/bin/mbinputmgr &
37 exit 0 45 exit 0
38fi \ No newline at end of file 46fi
47