From: Grazvydas Ignotas Date: Tue, 16 Oct 2012 21:45:40 +0000 (+0300) Subject: pandora-state: minor fixes X-Git-Tag: sz_152~5 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=fd4f966e5bd4d94acd78b15e2ed941f42d710782;hp=27d1592ffdfdd0cb45d750c4d276afb7ea95b7ed;ds=sidebyside pandora-state: minor fixes don't sudo in root script, check for files --- 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