|
发表于 2007-4-12 14:57:34
|
显示全部楼层
3Q,我参照如下完成了
好像atrpms.repo文件与LZ的不一样.
另:还是没解决重启后要手动启动3945的问题.
3) Wireless
0: Get NetworkManger working: all you have to do for this is to start
the NetworkManger services. System->Administration->Services
1: Add the "ATrpms" repository for yum by adding the file:
atrpms.repo
to the directory: /etc/yum.repos.d/
and in this file I put the lines:
[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/fc$releasever-$basearch/atrpms/stable
enabled=0
and then ran the commands:
shell# rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms
shell# yum --enablerepo=atrpm\* install ipw3945 ipw3945d ipw3945-ucode ipw3945-kmdl-CURRENT_KERNEL_VERSION_FC5smp
where CURRENT_KERNEL_VRESION is the version of the kernel that you are running.
You can figure out the version you are running with the command:
shell> uname -a
and this will print out all kinds of information about your kernel. Your
kernel version should be something like 2.6.17-1.2174_FC5smp.
2: Get the wireless kernel modules working...
shell# /sbin/depmod -a (you only have to do this once, right after installing
the rpms)
shell# /sbin/modprobe ipw3945 (load the kernel module)
shell# /sbin/ipw3945d (start the wireless daemon)
and then the wireless networks appear in the NetworkManager applet.
However, on restart, the module is not automatically loaded. However, to
fix this, I took the "wireless" script from Jim Hall's page:
http://us.fdos.org/linux/laptops/tp-t60/
and removed the case where it checks for eth0, since I'm going to let
NetworkManager deal with wired vs. wireless connections. So here's
my /etc/init.d/wireless file:
#! /bin/bash
#
# wireless Bring up/down integrated wireless networking (ipw3945)
#
# chkconfig: 2345 90 10
# description: Activates/Deactivates eth1 wireless interface (ipw3945)
#
### BEGIN INIT INFO
# # ipw3945d --help
# usage: ipw3945d [--OPTION]
# options:
# --quiet Load silently (unless errors occur)
# --version Display version information
# --debug=value Specify debug level to print
# --dvals View possible debug values
# --foreground Do not fork to background
# --kill Kill any running ipw3945d instance and exit
# --help View this help message
# --isrunning Check if already running. Returns 0 if yes.
# See how we were called.
case "$1" in
start)
/sbin/ipw3945d --isrunning
if [ $? -eq 0 ] ; then
echo "ipw3945d already running"
exit 1
fi
modprobe ipw3945
/sbin/ipw3945d
#ifup eth1
echo "ipw3945d started .."
;;
stop)
/sbin/ipw3945d --isrunning
if [ $? -ne 0 ] ; then
echo "ipw3945d not running"
exit 1
fi
ifdown eth1
/sbin/ipw3945d --kill
rmmod ipw3945
echo "ipw3945d stopped .."
;;
restart)
$0 stop ; $0 start
;;
esac
Once you create this file, make sure you set the permissions on this
file so that everyone can execute it (i.e. chmod a+x) and then run the
chkconfig program:
shell# /sbin/chkconfig --add wireless
Since nine-times out of ten I'm going to be using a wireless network,
I selected: System->Administration->Network and edited eth0 so that it would
not attempt to activate on startup. NetworkManager does a fine job activating
eth0 if you plug in an ethernet cable.
NOTES: One thing that can mess up wireless is if you have added an entry for
eth1 in System->Administration->Network. If you have done this, just delete
the entry and if you have followed the previous steps, things should work. |
|