[Dextrose] [PATCH][dextrose-platform] disable_mesh exit if already disabled
Martin Abente
martin.abente.lahaye at gmail.com
Fri Feb 4 10:02:08 EST 2011
Apparently, powerd's postresume.d scripts are also called
in other saving power situations. Therefore, the script
was endlessly waiting for the mesh to be enable in order
to re disable it.
This patch add this new scenario to the script logic.
---
etc/powerd/postresume.d/disable_mesh.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/etc/powerd/postresume.d/disable_mesh.sh b/etc/powerd/postresume.d/disable_mesh.sh
index 7d64c07..0aea85a 100755
--- a/etc/powerd/postresume.d/disable_mesh.sh
+++ b/etc/powerd/postresume.d/disable_mesh.sh
@@ -26,6 +26,11 @@
LBS_MESH=/sys/class/net/eth0/lbs_mesh
+if [ -f $LBS_MESH ] && [ $(cat $LBS_MESH) = "0x0" ]
+then
+ exit 0
+fi
+
while [ ! -f $LBS_MESH ] || [ $(cat $LBS_MESH) = "0x0" ]
do
sleep 0.5s
--
1.7.1
More information about the Dextrose
mailing list