# resolv.conf reset after rebooting

## VanillaGorilla

Every time I reboot my computer, it resets resolv.conf to a resolv.conf that doesn't work:

 *Quote:*   

> # Generated by net-scripts for interface lo
> 
> domain homenetwork

 

So every time I reboot my computer I have to add my nameserver to resolv.conf, which gets really annoying. Does anyone know how I can disable whatever it is that is  reseting resolv.conf?

----------

## overkll

Are you using dhcp to get an IP address?  If you are, and you're using dhcpcd client, you can add "-R" to your dhcp opts in /etc/conf.d/net.

```
dhcpcd_eth0="-R"
```

----------

## UberLord

You set dns_domain_lo="homenetwork" without specifying dns_servers_lo="1.2.3.4"

It's like saying "Make me a cup of tea" and expecting milk when you didn't ask for it.

----------

## Moriah

No, its more like doing it the same way you have always done it, and it always worked, until now.

I have the following /etc/conf.d/net file:

```
jacob ~ # cat /etc/conf.d/net

dns_domain_lo="elilabs.com"

config_eth0=( "192.168.1.18 netmask 255.255.255.0 brd 192.168.1.255" )

routes_eth0=( "default gw 192.168.1.1" )

mtu_eth0="1400"

jacob ~ # 
```

Every time I boot, it overwrites /etc/resolv.conf with:

```
jacob ~ # cat /etc/resolv.conf 

# Generated by net-scripts for interface lo

domain elilabs.com

jacob ~ # 
```

I have always just statically edited /etc/resolv.conf before, and I have been using Gentoo for 4 years, and linux for 14 years.

I suspect the fancy startup scripting is designed to make it easy for windoze refugees to get their internet working out of the box, but it breaks what has worked for years.  Everything is now on hidden autopilot, and its very frustrating.

How do I turn off this nonsense that overwrites my /etc/resolv.conf?  Remember, I am not using dhcpcd at this time, although I do plan to use it in the near future.  I don't want automatic /etc/resolv.conf setup; just let me edit it, and make the system not change it.

Thanks!   :Very Happy: 

----------

## Moriah

OK, I just discovered by experiment that if I comment out the line:

```
dns_domain_lo="elilabs.com"
```

from /etc/conf.d/net, then it leaves my /etc/resolv.conf file alone.  But now I don't know how to establish my domain name.    :Confused: 

----------

