On Thu, Oct 20, 2011 at 11:11 AM, <sophia.ort...@googlemail.com> wrote: > Johan Beisser <j...@caustic.org> wrote: > >> Check dhclient.conf(5) and read about the supersede statement. > > Thank you very much for your kind answer. Of course I read not > only dhclient.conf (5), but also a lot of man pages, a lot of > postings in the internet. I think, you misunderstood my question.
No, I really didn't. You don't want dhclient(8) to touch resolve.conf. I'm simply suggesting you set up dhclient.conf(5) to use supersede to set some things statically. Specifically set domain-name-servers and domain-name there, and when dhclient(8) fires off, it'll use your settings in resolv.conf. > Again: I dont want that dhclient touch my resolv.conf. > > This means that I am also unhappy even if dhclient creates a > resolv.conf containing exactly what I wanted that it contains, > I am also unhapy if dhclient fakes the file metadata, the dates, > in order that it appears as the file were untouched. You're screwed. You may want to check chmod(1) instead. Set resolv.conf(5) to be read only. I don't know if that'll prevent dhclient(8) from overwriting the file. I doubt it. > If that were the goal, I have another question: I want no > search statement in resolv.conf, the most near to that I get > is a line containing "search ." in resolv.conf with a line > containing > > supersede domain-name "."; > > in dhclient.conf. Do you how to get dhclient without it? I'm not sure what you mean. What may get you what you want (search domains) is in resolve.conf(5): On a machine whose network connection does not change frequently (such as a desktop machine on a local-area network), the resolv.conf.tail file should not be necessary. However the resolv.conf.tail file may be useful on notebooks, to search multiple domains, to refer to hard-coded informa- tion in local files, or otherwise override the defaults. > But again, I insist in my first question: how I get that > dhclient respect my resolv.conf and do not touch it? You read man pages.