Matthew Saltzman <[EMAIL PROTECTED]> writes:
> Mike Burger <[EMAIL PROTECTED]> wrote:
>
> >In the resolv.conf file, you should have a line, for each domain you want
> >to search, like this:
> >
> >domain domainname.here
>
> I guess I didn't make myself quite clear. The dhcp server at work tells
> my laptop what to put on the "search" line of my resolv.conf. So after
> booting at work, resolv.conf contains
>
> search domain1.work domain2.work domain3.work
> nameserver www.www.www.www
> nameserver www.www.www.www
>
> (where www.www.www.www are nameservers at work). Whatever was in resolv.conf
> before is overwritten.
>
> When I get home and boot, I'd like my home dhcp server to tell the laptop
> to search some other domains, e.g.,
>
> search localdomain domain1.work domain2.fun
> nameserver hhh.hhh.hhh.hhh
> nameserver hhh.hhh.hhh.hhh
>
> (where hhh.hhh.hhh.hhh are nameservers at home). I'd rather not have to
> edit resolv.conf by hand all the time, because it just gets overwritten
> when I get to work. But I can't figure out how to get my dhcpd to feed
> the additional domains to my laptop's dhcp client. I can get it to feed
> the nameservers and localdomain (using 'option domain-name "localdomain"),
> but no documentation that I've found tells me how to feed domain1.work and
> domain2.fun.
>
> Hope that makes my question clearer. Thanks.
The question seem clear enough.
So since you are running `dhcpcd' at home. Dhcpcd has a (now
depricated) `-c' flag that can be used to run any file you want.
You could use it to run a script that extracts the information from
/etc/dhcpc/dhcpcd-eth0.info (Where it should be listed if your home IP
server is sending it). And overwrites /etc/resolv.conf with the new info.
If you are running dhcpcd from /sbin/ifup, you can find where the
flags are set in that script and add the -c flag pointing to the
home grown script.
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list