From 311312722b9e2f02deec0f5f64ca67ef90975fc1 Mon Sep 17 00:00:00 2001 From: Roger Monk Date: Tue, 23 Mar 2010 23:35:17 +0000 Subject: freondemo/gstd: Add updates from latest RR recipes * Updated recipes (logic) merged from latest Ridgerun recipes * Whitespace formatting maintained from earlier cleanup Signed-off-by: Roger Monk Signed-off-by: Koen Kooi --- recipes/freondemo/files/freondemo | 34 +++++++++++++++++++++++----------- recipes/freondemo/files/freondemo.init | 7 +++---- 2 files changed, 26 insertions(+), 15 deletions(-) mode change 100644 => 100755 recipes/freondemo/files/freondemo (limited to 'recipes/freondemo/files') diff --git a/recipes/freondemo/files/freondemo b/recipes/freondemo/files/freondemo old mode 100644 new mode 100755 index 80dd36e132..bd8a3b609f --- a/recipes/freondemo/files/freondemo +++ b/recipes/freondemo/files/freondemo @@ -1,20 +1,32 @@ #!/bin/sh # We start a system wide gstd daemon -gstd & - -amixer -q sset 'HP DAC' 127 +if ! pidof gstd > /dev/null; then + { gstd 2>&1 | logger -t GSTD & } ; +fi + + +amixer -q sset 'HP DAC' 127 +amixer -q sset 'Line DAC' 127 #If we detect a mouse, use it, otherwise configure the touchcreen -if [ ! -c /dev/input/mice ] && [ ! -c /dev/input/mouse0 ] ; then - if [ -c /dev/input/touchscreen0 ] ; then - export TSLIB_TSDEVICE=/dev/input/touchscreen0 - if [ ! -f /etc/pointercal ] ; then - # We need to calibrate the screen - ts_calibrate - fi - export QWS_MOUSE_PROTO=tslib +if ! grep -q mouse1 /proc/bus/input/devices ; then + if grep -q Touchscreen /proc/bus/input/devices && [ -c /dev/input/touchscreen0 ] ; then + export TSLIB_TSDEVICE=/dev/input/touchscreen0 + if [ ! -f /etc/pointercal ] ; then + # We need to calibrate the screen + ts_calibrate + fi + echo -e "\nFreonDemo using touchscreen" + export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0 + else + echo "ERROR, no mouse or touchscreen detected for FreonDemo" + exit 1; fi +else + echo -e "\nFreonDemo using mouse input" + export QWS_MOUSE_PROTO=MouseMan:/dev/input/mouse1 fi +#Otherwise try to use the touchscren /usr/libexec/FreonDemo -qws & diff --git a/recipes/freondemo/files/freondemo.init b/recipes/freondemo/files/freondemo.init index 5cb5281245..3b406b2968 100644 --- a/recipes/freondemo/files/freondemo.init +++ b/recipes/freondemo/files/freondemo.init @@ -4,7 +4,7 @@ set -e DAEMON=/usr/bin/freondemo NAME=freondemo -PIDFILE=/var/run/freondemo/pid +PIDFILE=/var/run/freondemo.pid DESC="Freon Demo" PARAMS="" @@ -22,10 +22,9 @@ start_it_up() fi fi - source $SESSIONFILE echo -n "Starting $DESC: " - start-stop-daemon --start --pidfile $PIDFILE \ - --exec $DAEMON -- $PARAMS + start-stop-daemon --start --exec $DAEMON -- $PARAMS + pidof FreonDemo > $PIDFILE echo "$NAME." } -- cgit v1.2.3