我按照google上找到的这个安装指示,
http://ubuntuforums.org/showthread.php?t=140085
逐步操作,但到最后一步遇到问题:
代码: 全选
Now just download the driver and compile it with make
Then there is a load script with the driver that will run the daemon
Code:
sudo ./load
代码: 全选
zhanghong@T60:~/tmp/intel/ipw3945-1.2.2$ sudo ./load
./load: 5: Syntax error: "(" unexpected
脚本代码如下:
代码: 全选
#!/bin/sh
# Copyright (C) 2004-2005 Intel Corporation
MODULE=ipw3945
function check_root()
{
[ `whoami` != "root" ] &&
echo "You must be root to run this script." &&
return 1
}
function unload()
{
./unload -ipw3945d=${path} || return 1
}
function load_pre
{
for i in firmware_class; do
if ! (lsmod | grep -q $i) && \
! (modprobe $i > /dev/null 2>&1 && LOADED="${LOADED}${i} ") && \
! (grep -q request_firmware /proc/kallsyms); then
if [ ! -e /proc/kallsyms ]; then
echo "Could not be determine if firmware_class is already loaded."
echo "Attempting to load driver anyway..."
else
echo "Firmware capabilities not found. See INSTALL."
return 1
fi
fi
done
}
function load_modules
{
I_DEBUG=""
for i in ieee80211; do
modprobe ieee80211 ${I_DEBUG} && LOADED="${LOADED}${i} "
done
insmod ./${MODULE}.ko $@ && LOADED="${LOADED}${MODULE} "
}
function load()
{
load_pre && load_modules $@ && {
if [ -z "${LOADED}" ]; then
echo "No modules loaded."
else
echo "Loaded: ${LOADED}"
fi
return 0
}
echo "Load failed."
return 1
}
function parse_args()
{
driver_args=
while [ "$1" ]; do
case $1 in
-ipw3945d=*)
path=$1
path=${path/*=//}
shift
;;
--)
shift
break
;;
*)
driver_args="$driver_args $1"
shift
;;
esac
done
daemon_args=$@
path=${path/%\//}/
[ -x ${path}ipw3945d ] || {
cat << EOD
${path}ipw3945d does not exist or is not an executable.
You can specify the path for the ipw3945d via the -ipw3945d parameter:
% ./load -ipw3945d=~/bin
The above will attempt to locate ipw3945d in the ~/bin directory.
EOD
return 1
}
}
unset LOADED
path=/sbin
parse_args $@ &&
unload &&
load $driver_args &&
echo -n "Loading ipw3945d."
${path}ipw3945d $daemon_args &&
echo -n "." &&
sleep 1 &&
echo -n "." &&
sleep 1 &&
echo "done."