#!/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 XO_MODEL=/ofw/mfg-data/MN if [ ! -f $XO_MODEL ] || [ $(cat $XO_MODEL) != "XO-1" ] then exit 0 fi if [ -f $LBS_MESH ] && [ $(cat $LBS_MESH) = "0x0" ] then exit 0 fi while [ ! -f $LBS_MESH ] || [ $(cat $LBS_MESH) = "0x0" ] do sleep 0.5s done echo 0 > $LBS_MESH