You are not logged in.

#1 2009-08-04 05:57:47

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

How is resolve.conf.head used?

What on earth does resolv.conf.head actually do? I have never seen it actually work in any circumstance, and from my Googling on the topics of manually setting DNS servers, practically no one else can use them with any success.

I use DNSMasq for caching. Right now I have the problem of needing to preserve whatever dhcpcd puts in my /etc/resolv.conf, that way I can just let DNSMasq to use it, but I need to set the default DNS server to be localhost. I could just put "nameserver 127.0.0.1" in /etc/resolv.conf.head and, theoretically, everything would work fine, but it doesn't. Manually putting it at the top of resolv.conf, though, does work.

* Is this because the programs that consult resolv.conf are not bothering to check .head?
* Does dhcpcd need to be told to include .head and .tail when writing to resolv.conf?
* How can resolv.conf.head ever be used? Do I need a script to manually ajoin it with resolv.conf ?

The man pages for dhcpcd and resolv.conf don't seem to be useful on this topic.

Offline

#2 2009-08-04 07:43:29

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: How is resolve.conf.head used?

Hmm, works alright for me:

cat /etc/resolv.conf.head
nameserver 127.0.0.1
nameserver 208.67.222.222
nameserver 208.67.220.220
commentstrip x /etc/dhcpcd.conf
hostname
option domain_name_servers, domain_name, domain_search, host_name
option ntp_servers
require dhcp_server_identifier
nohook lookup-hostname
noipv4ll
timeout 60

Possibly something else?


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#3 2009-08-04 08:41:09

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: How is resolve.conf.head used?

Works For Me ®

Are you using some network managers?


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#4 2009-08-10 23:26:21

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: How is resolve.conf.head used?

Sounds like you need openresolv

But about dhcpcd - it only re-writes /etc/resolv.conf when dhcpcd changes state. It also puts nice comments in the file. So if those comments are not there then something else was overwritten resolv.conf and not dhcpcd.

To debug dhcpcd scripts, create /etc/dhcpcd.enter-hook and put one line there
set -x

Then launch dhcpcd in the console with debugging - dhcpcd -dB

Good luck!

Offline

Board footer

Powered by FluxBB