#!/bin/sh # ipw3945d_up # Make up the Intel Corporation PRO/Wireless 3945ABG Network Connection # Last modify: 04/06/07 # by spina # This file may be distributed and/or modified under the terms of the # GNU General Public License version 2 as published by the Free Software # Foundation # # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # Visit http://www.gnu.org/copyleft/gpl.html for GPL licensing information. function error() { echo "ERROR: $@"; exit 1; } [ `id -u` -gt 0 ] && error "Only root can do it!"; ! which ipw3945d >& /dev/null && error "ipw3945d - command not found"; ! which ipw3945d_down >& /dev/null && error "ipw3945d_down - command not found"; [ ! -e /lib/firmware/ipw3945.ucode ] && error "ipw3945.ucode not found in /lib/firmware/"; if ipw3945d --isrunning; then ! ipw3945d_down && exit 1; fi ! modprobe ipw3945 $@ && error "Module not loaded"; ! ipw3945d && error "ipw3945d not started"; exit 0;