Re: [gentoo-user] What overwrites resolv.conf
On Wednesday 23 April 2008 21:00:25 Alan McKinnon wrote: My solution: don't use static ip's at home, set up a dhcp server with a permanent lease for your machine, then have it download the resolv.conf that you really do want at home. My solution was simply to chattr +i /etc/resolv.conf, but that stopped being available when I switched from ext3 to reiserfs. -- Rgds Peter -- gentoo-user@lists.gentoo.org mailing list
[gentoo-user] What overwrites resolv.conf
I received a used laptop a week or so ago, wiped the tinker-toy OS offered with it and proceeded to do the right thing. So far, I have got a machine I can (manually) put to sleep and use on a wireless network. So far, so good. At home, I don't have a wireless AP, but a 50-ft. ethernet cable. When I connect via wireless (at the office, say), then use my machine at home, resolv.conf is toasted, where I use fixed IP and put my DNS servers in there. DHCP is used everywhere else. So, what overwrites it, when, how, and how to stop it? Is there a definitive guide to the syntax of the various config files? Or, BETTER YET, is there anyone who has a smoothly-functioning configuration to switch between wireless DHCP and connected hard-wired net setups and would like to share? Cheers, -- |\ /|| | ~ ~ | \/ ||---| `|` ? ||ichael | |iggins\^ / michael.higgins[at]evolone[dot]org -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] What overwrites resolv.conf
add this to your /etc/conf.d/net dns_servers_ESSID=( 192.168.0.1 192.168.0.2 ) dns_domain_ESSID=some.domain dns_search_ESSID=search.this.domain search.that.domain you can also swap-out ESSID for eth0/wlan0 respectivly if they settings differ. This way, when you start the rspective device, /etc/resolv.conf will get the right settings. C- On Wed, Apr 23, 2008 at 12:07 PM, Michael Higgins [EMAIL PROTECTED] wrote: I received a used laptop a week or so ago, wiped the tinker-toy OS offered with it and proceeded to do the right thing. So far, I have got a machine I can (manually) put to sleep and use on a wireless network. So far, so good. At home, I don't have a wireless AP, but a 50-ft. ethernet cable. When I connect via wireless (at the office, say), then use my machine at home, resolv.conf is toasted, where I use fixed IP and put my DNS servers in there. DHCP is used everywhere else. So, what overwrites it, when, how, and how to stop it? Is there a definitive guide to the syntax of the various config files? Or, BETTER YET, is there anyone who has a smoothly-functioning configuration to switch between wireless DHCP and connected hard-wired net setups and would like to share? Cheers, -- |\ /|| | ~ ~ | \/ ||---| `|` ? ||ichael | |iggins\^ / michael.higgins[at]evolone[dot]org -- gentoo-user@lists.gentoo.org mailing list -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] What overwrites resolv.conf
Michael Higgins wrote: So, what overwrites it, when, how, and how to stop it? Is there a definitive guide to the syntax of the various config files? Or, BETTER YET, is there anyone who has a smoothly-functioning configuration to switch between wireless DHCP and connected hard-wired net setups and would like to share? It's being overwritten by your DHCP client, which is the expected behavior. As long as your setup is such that your wireless card always uses DHCP, and your wired card never uses DHCP, you can configure the Gentoo networking script to do the right thing depending on which interface you're starting up. In your /etc/conf.d/net setup, add variables for: config_eth0 = ( w.x.y.z/nn ) dns_servers_eth0 = ( w.x.y.z, w.x.y.z ) dns_domain_eth0 = my.domain This will work as long as you manually stop and start the interfaces when you switch adapters. The net.eth0 startup script will write out a new resolv.conf, etc. --Mike -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] What overwrites resolv.conf
Hello On Wed, Apr 23, 2008 at 09:07:29AM -0700, Michael Higgins wrote: So, what overwrites it, when, how, and how to stop it? Is there a definitive guide to the syntax of the various config files? Or, BETTER YET, is there anyone who has a smoothly-functioning configuration to switch between wireless DHCP and connected hard-wired net setups and would like to share? I didn't like the way Gentoo handled network (wifi OK, but ethernet with different locations was a pain somehow), so I wrote a little perl thing I use as a network manager. However, I think noone who did not read and understand its code is able to use it to anything, since it has no documentation and completely non-intuitive control. You can find it here http://vorner.pretel.cz/en/netprofile.html, if you feel brave enough. If anyone is interested, I can answer questions about it off-list (not to scare others). -- I left the ssh key under the doormat Michal 'vorner' Vaner pgpd102xAQmUD.pgp Description: PGP signature
Re: [gentoo-user] What overwrites resolv.conf
On Wed, 23 Apr 2008 13:03:55 -0400 Mike Edenfield [EMAIL PROTECTED] wrote: Michael Higgins wrote: So, what overwrites it, when, how, and how to stop it? Is there a definitive guide to the syntax of the various config files? Or, BETTER YET, is there anyone who has a smoothly-functioning configuration to switch between wireless DHCP and connected hard-wired net setups and would like to share? Thanks to all for your replies. I think I've got it now! -- |\ /|| | ~ ~ | \/ ||---| `|` ? ||ichael | |iggins\^ / michael.higgins[at]evolone[dot]org -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] What overwrites resolv.conf
On Wednesday 23 April 2008, Michael Higgins wrote: I received a used laptop a week or so ago, wiped the tinker-toy OS offered with it and proceeded to do the right thing. So far, I have got a machine I can (manually) put to sleep and use on a wireless network. So far, so good. At home, I don't have a wireless AP, but a 50-ft. ethernet cable. When I connect via wireless (at the office, say), then use my machine at home, resolv.conf is toasted, where I use fixed IP and put my DNS servers in there. DHCP is used everywhere else. So, what overwrites it, when, how, and how to stop it? Is there a definitive guide to the syntax of the various config files? Or, BETTER YET, is there anyone who has a smoothly-functioning configuration to switch between wireless DHCP and connected hard-wired net setups and would like to share? Aaaah, the old obliterate-your-resolv.conf file problem :-) It is possible to tell dhcp servers to not present a resolv.conf file to all (or specific) clients. However, I always found this to be a major pain in the arse. My solution: don't use static ip's at home, set up a dhcp server with a permanent lease for your machine, then have it download the resolv.conf that you really do want at home. Other locations might by broken but at least you know you are guaranteed to get what you want when at home -- Alan McKinnon alan dot mckinnon at gmail dot com -- gentoo-user@lists.gentoo.org mailing list