#!/bin/sh # # Title: wled for ASUS Z62/96F laptop # # Purpose: # 1. To check and turn on wled if wireless kill switch is off. # # Copyright (C) 2007 Linuxvillage Inc. # # This wled hack for Z62/96 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, 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., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA. # # # check rf_kill switch RF_KILL=`cat /sys/bus/pci/drivers/ipw3945/0000:02:00.0/rf_kill` ENABLED=`cat /sys/bus/pci/drivers/ipw3945/0000:02:00.0/enable` wled_on() { echo 1 > /proc/acpi/asus/wled } if [ -n $RF_KILL ] && [ $RF_KILL -gt 0 ] then echo "kill switch is on, rf_kill=$RF_KILL" wled_on else # rf_kill switch is off, but wled is off. WLED=`cat /proc/acpi/asus/wled` if [ -n $WLED ] && [ $WLED -gt 0 ] then wled_on fi fi