diff options
author | Richard Purdie <richard@openedhand.com> | 2006-02-09 16:05:01 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-02-09 16:05:01 +0000 |
commit | e745d175d9a5a5d7a185885a7ca97bbe5797137b (patch) | |
tree | f68ebebb131af8281b81d0f2c882f284739217e0 /openembedded | |
parent | ce6bf88ef25fab7f2c36d83a65cad5765051f116 (diff) | |
download | poky-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-x | openembedded/packages/chkhinge26/chkhinge26_svn.bb | 2 | ||||
-rwxr-xr-x | openembedded/packages/chkhinge26/files/hinge-handler | 19 |
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" | |||
2 | SECTION = "x11" | 2 | SECTION = "x11" |
3 | MAINTAINER = "Matthew Allum <mallum@openedhand.com>" | 3 | MAINTAINER = "Matthew Allum <mallum@openedhand.com>" |
4 | DESCRIPTION = "Chkhinge26 fires off cmds on cXXXX Zs." | 4 | DESCRIPTION = "Chkhinge26 fires off cmds on cXXXX Zs." |
5 | PR = "r1" | 5 | PR = "r2" |
6 | 6 | ||
7 | SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=chkhinge26;proto=http \ | 7 | SRC_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 | ||
6 | killproc() { # 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 | |||
6 | export DISPLAY=:0 | 14 | export DISPLAY=:0 |
7 | 15 | ||
8 | if [ -z "$1" ]; then | 16 | if [ -z "$1" ]; then |
@@ -20,10 +28,10 @@ fi | |||
20 | 28 | ||
21 | if [ $STATE = "0" ]; then | 29 | if [ $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 |
29 | fi | 37 | fi |
@@ -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 |
38 | fi \ No newline at end of file | 46 | fi |
47 | |||