From: Grazvydas Ignotas Date: Sat, 11 Feb 2012 19:45:46 +0000 (+0200) Subject: op_power.sh: fix lockfile usage X-Git-Tag: sz_beta3~41 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=9e908cf904a4f81c3de5dfd0c7db2d6fe64569c2 op_power.sh: fix lockfile usage --- diff --git a/recipes/pandora-system/pandora-scripts/op_power.sh b/recipes/pandora-system/pandora-scripts/op_power.sh index cc290aa..25ca48a 100644 --- a/recipes/pandora-system/pandora-scripts/op_power.sh +++ b/recipes/pandora-system/pandora-scripts/op_power.sh @@ -2,7 +2,9 @@ . /usr/pandora/scripts/op_paths.sh -( test -e /tmp/op_power.lock && exit 2 ) || touch "/tmp/op_power.lock" +# XXX: better use lockfile (or something), but it's not in current firmware +test -e /tmp/op_power.lock && exit 2 +touch /tmp/op_power.lock debug(){ return 1 # 0 when debugging, 1 when not @@ -173,4 +175,4 @@ elif [[ "$2" == "lid" ]]; then debug && echo "powerstate=$powerstate" echo "$powerstate" > /tmp/powerstate - +rm -f /tmp/op_power.lock