|
|
我用笔记本,有net.eth0和net.wlan0,当没有有线,只有无线时,依赖网络的服务启动不了。
apple ~ # /etc/init.d/ntp-client start
* Bringing up interface eth0
* Running preup ...
* ERROR: interface eth0 does not exist
* Ensure that you have loaded the correct kernel module for your hardware
* ERROR: net.eth0 failed to start
* ERROR: cannot start ntp-client as net.eth0 would not start
实际上,我的net.wlan0是开通的。以前在baselayout 1的时候没这个问题。
这是我的/etc/conf.d/net
- # This blank configuration will automatically use DHCP for any net.*
- # scripts in /etc/init.d. To create a more complete configuration,
- # please review /etc/conf.d/net.example and save your configuration
- # in /etc/conf.d/net (this file :]!).
- #dns_server_eth0=( "192.168.1.10" )
- preup() {
- if [[ ${IFACE} == "wlan0" ]]; then
- if ifplugstatus | grep -q 'eth0: link beat detected'; then
- ewarn "Wired connection on eth0 detected, aborting \
- configuration on ${IFACE}"
- return 1
- fi
- fi
- return 0
- }
- config_eth0="192.168.1.108/24"
- routes_eth0="default gw 192.168.1.1"
- #modules=( "iwconfig" )
- #rate_wlan=( "auto" )
- modules="wpa_supplicant"
- wpa_supplicant_wlan0="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"
- config_wlan0="192.168.1.108/24"
- routes_wlan0="default gw 192.168.1.1"
- dns_server_wlan0="192.168.1.1"
- fallback_wlan0="dhcp"
- iwconfig_wlan0="mode managed"
- #depend_wlan0() {
- # need ipw3945d
- #}
复制代码
多谢帮助! |
|