Longshot; Conditional '/etc/hosts' depending on an iface's subnet?

Brandon Sandrowicz bsandrow-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Dec 2 08:23:06 UTC 2009


On Mon, Nov 30, 2009 at 9:55 PM,  <jvetterli-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f at public.gmane.org> wrote:
>
> How about a script that read, modifies, and rewrites your hosts file?

Or two different hosts files (/etc/hosts.work, /etc/hosts.home) and a
symlink to the currently used one (e.g. `ln -s hosts.home
/etc/hosts`)? Then maybe a script that can quickly swap them by hand
(manually running the script) or automatically (cronjob to evaluate
the current network and link to the correct hosts file).
-- 
Brandon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list