resolv.conf question

Is there any other way, than change flag, to prevent resolv.conf from being overwritten constantly. Is there something like
DHCP_KEEPRESOLV[0]="yes"
 
Nikosis said:
Is there any other way, than change flag, to prevent resolv.conf from being overwritten constantly. Is there something like
DHCP_KEEPRESOLV[0]="yes"

Below my `dhclient.conf`. Please note that the file `resolv.conf` is still rewritten each time you call `dhclient`, but the response from DHCP server is "superseded" here.

Code:
interface "ndis0" {
  supersede domain-name-servers 127.0.0.1; 
}
interface "re0" {
  supersede domain-name-servers 127.0.0.1;
}
 
Create a file called /etc/dhclient-enter-hooks and put this in there:
Code:
add_new_resolv_conf() {
        # We don't want /etc/resolv.conf changed
        # So this is an empty function
        return 0
}

That will prevent dhclient from overwriting /etc/resolv.conf.
 
I'm not sure what's going on now, but after 3 min nothing works, no internet, terminal doesn't react to anything, even after I logout from kde, any command doesn't work and there is nothing I can do but restart the system. and then I have another 3 min.
 
Is the 3 min. consistent with your DHCP lease time?

Do you have a firewall running? You must make sure the DHCP messages are allowed through.
 
I haven't change anything in firewall, so everything should be fine.
It's a fresh install.
It started to happen when I changed flags to immutable, but problem remains even after I changed that back.
 
Back
Top