From: Grazvydas Ignotas Date: Sun, 29 Apr 2012 17:03:20 +0000 (+0300) Subject: pandora-scripts: add forgotten op_nubchange.sh X-Git-Tag: sz_beta4^0 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=139f9e737699df74c51fa2b36cee113f453284b7 pandora-scripts: add forgotten op_nubchange.sh --- diff --git a/recipes/pandora-system/pandora-scripts/op_nubchange.sh b/recipes/pandora-system/pandora-scripts/op_nubchange.sh new file mode 100755 index 0000000..96c6a85 --- /dev/null +++ b/recipes/pandora-system/pandora-scripts/op_nubchange.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ $# -ne 2 ]; then + echo "usage:" + echo "$0 " + exit 1 +fi + +nub0_ev=`grep -A8 nub0 /proc/bus/input/devices | grep '^H: ' | awk '{print $3}'` +nub1_ev=`grep -A8 nub1 /proc/bus/input/devices | grep '^H: ' | awk '{print $3}'` + +echo $1 > /proc/pandora/nub0/mode +echo $2 > /proc/pandora/nub1/mode + +for i in `seq 20`; do + if test -c /dev/input/$nub0_ev && test -c /dev/input/$nub1_ev; then + break; + fi + sleep .1 +done