|
|
发表于 2009-2-20 23:05:47
|
显示全部楼层
Post by oceanboo;1950042
dhcpcd 可以加参数使它不修改 /etc/resolv.conf 。
具体可以查看 man dhcpcd。
-C, --nohook script
Don't run this hook script. Matches full name, or prefixed with 2 numbers optionally ending with .sh.
So to stop dhcpcd from touching your DNS or MTU settings you would do:-
dhcpcd -C resolv.conf -C mtu eth0
这个选项不太管用的说
我试过dhcpcd -C reslov.conf wlan0
结果reslov.conf照样被修改
/etc/dhcpcd.conf里面有下面:
- # A sample configuration for dhcpcd.
- # See dhcpcd.conf(5) for details.
- # dhcpcd-run-hooks uses these options.
- option domain_name_servers, domain_name, domain_search, host_name
- # Most distros have ntp support.
- option ntp_servers
复制代码
不知道把 这里的domain_name_servers选项去掉行不
回头试试
手头没有接上dhcpcd的网络 没法测试 |
|