1 |
> |
2 |
> I'm trying to get my nameserver setting to stick in resolv.conf when I |
3 |
> restart the network or reboot. Layman will not work with my ISP's DNS |
4 |
> server for some crazy reason. Anyway, I have this in /etc/conf.d/net file: |
5 |
> |
6 |
|
7 |
Dale, |
8 |
if I understood correctly, you want to set the contents of |
9 |
/etc/resolv.conf and don't want dhcp to overwrite ir. Right? |
10 |
|
11 |
> modules="dhcpcd" |
12 |
> config_eth2="dhcp" |
13 |
> dns_servers_eth2="nameserver 8.8.8.8 nameserver 8.8.4.4" |
14 |
> |
15 |
> As you can see I need it set to 8.8.8.8 but it doesn't seem to see my |
16 |
> setting. After I restart my network, it updates resolv.conf to this: |
17 |
> |
18 |
|
19 |
I don't know about dhcpcd, but I'm using dhclient, and it works like this: |
20 |
$cat /etc/resolv.conf |
21 |
config_eth0=("dhcp") |
22 |
modules_eth0=("dhclient") |
23 |
dhcp_eth0="nodns" |
24 |
|
25 |
I'm not sure the last line is necessary. |
26 |
Then: |
27 |
|
28 |
$ cat /etc/dhcp/dhclient.conf |
29 |
append option domain-name-servers 127.0.0.1 |
30 |
|
31 |
Substitute 127.0.0.1 by 8.8.8.8 |
32 |
|
33 |
HTH |
34 |
|
35 |
Jorge |