Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate
1
#!/bin/sh
2
# Copyright (C) 2010, Martin Abente
3
#
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
18
#WARNING: 
19
#         This is a workaround for disabling the mesh until the feature gets
20
#         included in the libertas code. Therefore this workaround MUST be
21
#         removed after that.
22
23
#INSTRUCTIONS:
24
#         1. Copy this file to /etc/powerd/postresume.d
25
#         2. Grant it execution permissions (chmod 755)
26
27
LBS_MESH=/sys/class/net/eth0/lbs_mesh
28
XO_MODEL=/ofw/mfg-data/MN
29
30
if [ ! -f $XO_MODEL ] || [ $(cat $XO_MODEL) != "XO-1" ]
31
then
32
    exit 0
33
fi
34
35
if [ -f $LBS_MESH ] && [ $(cat $LBS_MESH) = "0x0" ]
36
then
37
    exit 0
38
fi
39
40
while [ ! -f $LBS_MESH ] || [ $(cat $LBS_MESH) = "0x0" ]
41
do
42
    sleep 0.5s
43
done
44
45
echo 0 > $LBS_MESH