From 139f9e737699df74c51fa2b36cee113f453284b7 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 29 Apr 2012 20:03:20 +0300 Subject: [PATCH] pandora-scripts: add forgotten op_nubchange.sh --- .../pandora-scripts/op_nubchange.sh | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 recipes/pandora-system/pandora-scripts/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 -- 2.39.2