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/packages/chkhinge26/files | |
parent | ce6bf88ef25fab7f2c36d83a65cad5765051f116 (diff) | |
download | openembedded-core-e745d175d9a5a5d7a185885a7ca97bbe5797137b.tar.gz openembedded-core-e745d175d9a5a5d7a185885a7ca97bbe5797137b.tar.bz2 openembedded-core-e745d175d9a5a5d7a185885a7ca97bbe5797137b.tar.xz openembedded-core-e745d175d9a5a5d7a185885a7ca97bbe5797137b.zip |
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/packages/chkhinge26/files')
-rwxr-xr-x | openembedded/packages/chkhinge26/files/hinge-handler | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/openembedded/packages/chkhinge26/files/hinge-handler b/openembedded/packages/chkhinge26/files/hinge-handler index d8100e9b2..5d5f62e30 100755 --- a/openembedded/packages/chkhinge26/files/hinge-handler +++ b/openembedded/packages/chkhinge26/files/hinge-handler @@ -3,6 +3,14 @@ # Quick handler for chkhinge26 and X. # +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 +} + export DISPLAY=:0 if [ -z "$1" ]; then @@ -20,10 +28,10 @@ fi if [ $STATE = "0" ]; then echo "lanscape" - killall mbinputmgr + killproc /usr/bin/mbinputmgr # urg mbinputmgr should kill below - killall matchbox-keyboard - killall matchbox-stroke + killproc /usr/bin/matchbox-keyboard + killproc /usr/bin/matchbox-stroke xrandr -o normal exit 0 fi @@ -33,6 +41,7 @@ if [ $STATE = "2" ]; then xrandr -o left # just to be extra safe sleep 1 - mbinputmgr & + /usr/bin/mbinputmgr & exit 0 -fi
\ No newline at end of file +fi + |