Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnish Mangal <anish@sugarlabs.org>2011-02-01 23:15:24 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2011-02-02 00:47:13 (GMT)
commite538ba6f922b1376d7bd8111d719f9708db78859 (patch)
treef382a862bb52b5fa877b6593092fd4a6d0bfc137
Redisable mesh after suspend fix
Signed-off-by: Anish Mangal <anish@sugarlabs.org>
-rwxr-xr-xetc/powerd/postresume.d/disable_mesh.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/etc/powerd/postresume.d/disable_mesh.sh b/etc/powerd/postresume.d/disable_mesh.sh
new file mode 100755
index 0000000..7d64c07
--- /dev/null
+++ b/etc/powerd/postresume.d/disable_mesh.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Copyright (C) 2010, Martin Abente
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+#WARNING:
+# This is a workaround for disabling the mesh until the feature gets
+# included in the libertas code. Therefore this workaround MUST be
+# removed after that.
+
+#INSTRUCTIONS:
+# 1. Copy this file to /etc/powerd/postresume.d
+# 2. Grant it execution permissions (chmod 755)
+
+LBS_MESH=/sys/class/net/eth0/lbs_mesh
+
+while [ ! -f $LBS_MESH ] || [ $(cat $LBS_MESH) = "0x0" ]
+do
+ sleep 0.5s
+done
+
+echo 0 > $LBS_MESH
+
+