From fd4f966e5bd4d94acd78b15e2ed941f42d710782 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Wed, 17 Oct 2012 00:45:40 +0300 Subject: [PATCH 1/1] pandora-state: minor fixes don't sudo in root script, check for files --- recipes/pandora-system/pandora-state.bb | 2 +- recipes/pandora-system/pandora-state/rc.pandora-state | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/pandora-system/pandora-state.bb b/recipes/pandora-system/pandora-state.bb index b0b9aed..986505d 100755 --- a/recipes/pandora-system/pandora-state.bb +++ b/recipes/pandora-system/pandora-state.bb @@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" RDEPENDS = "pandora-scripts" -PR = "r15" +PR = "r16" inherit update-rc.d INITSCRIPT_NAME = "pandora-state" diff --git a/recipes/pandora-system/pandora-state/rc.pandora-state b/recipes/pandora-system/pandora-state/rc.pandora-state index a76329b..149989e 100644 --- a/recipes/pandora-system/pandora-state/rc.pandora-state +++ b/recipes/pandora-system/pandora-state/rc.pandora-state @@ -45,9 +45,11 @@ d_start() { fi cat /etc/pandora/conf/dirty_expire_centisecs > /proc/sys/vm/dirty_expire_centisecs cat /etc/pandora/conf/gamma.state > $SYSFS_GAMMA - dssgamma=$(cat /etc/pandora/conf/dssgamma.state) - dssgamma2=$(echo "scale=2;$dssgamma / 100" | bc) - sudo /usr/pandora/scripts/op_gamma.sh $dssgamma2 + if [ -f /etc/pandora/conf/dssgamma.state ]; then + dssgamma=$(cat /etc/pandora/conf/dssgamma.state) + dssgamma2=$(echo "scale=2;$dssgamma / 100" | bc) + /usr/pandora/scripts/op_gamma.sh $dssgamma2 + fi if [ -f /etc/pandora/conf/filter.state ]; then filter=$(cat /etc/pandora/conf/filter.state) /usr/pandora/scripts/op_videofir.sh $filter -- 2.39.2