系统重启后没有Wi-Fi

发生了一些奇怪的事情…我已经在我的Ubuntu Server 11.04机器上安装了一张Wi-Fi卡。

要配置它,我执行以下操作:

sudo vi /etc/network/interfaces 

加:

 iface wlan0 inet dhcp wpa-driver wext wpa-ssid "Sweet Home" wpa-ap-scan 1 wpa-proto WPA wpa-pairwise TKIP wpa-group TKIP wpa-key-mgmt WPA-PSK wpa-psk  auto wlan0 

然后:

 $ sudo /etc/init.d/networking restart * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces * Reconfiguring network interfaces... ssh stop/waiting ssh start/running, process 1522 ssh stop/waiting ssh start/running, process 1590 

我的机器成功获取了我的无线适配器的IP。

重启后它无法在无线网络中获得任何IP。 为了解决这个问题,我再次运行/etc/init.d/networking restart ,一切都很好 – 它获得了一个ip。

我知道我应该将它添加到我的启动脚本中以使其正常工作,但也许有更好的方法来配置它?

UPD:我试图将它添加到启动(将一个链接重新启动脚本放入/etc/rcS.d/S80restartwireless但没有成功……它重新启动但我仍然需要手动重启网络才能使其正常工作。

这确实看起来像SpamapS所说的错误。 报告问题:

https://help.ubuntu.com/community/ReportingBugs

注意这可能是一个时间问题,并且wifi连接可能需要让其余的网络堆栈等待。

您可能也有兴趣使用网络管理器而不是手动配置。 网络管理员会自动尝试重新连接,这是桌面使用的内容。

http://docs.fedoraproject.org/en-US/Fedora/13/html/User_Guide/sect-User_Guide-Connecting_to_the_Internet-NM_CLI.html