[ale] is there a bash command to include a file in /etc/hosts?

Wolf Halton wolf.halton at gmail.com
Fri Jul 13 13:34:12 EDT 2012


On Fri, Jul 13, 2012 at 11:31 AM, Scott Plante <splante at insightsys.com>wrote:

> I like the puppet and the internal DNS ideas better, but if you want
> something quick an dirty you could put a command like this in your crontab:
> [[ /etc/hosts.base -nt /etc/hosts || /etc/hosts.share -nt /etc/hosts ]] &&
> cat /etc/hosts.base /etc/hosts.share > /etc/hosts
> It'll overwrite your /etc/hosts if you update your /etc/hosts.base or
> /etc/hosts.share file with the contents of both.
>
> Scott
>
> ------------------------------
> *<SNIP>*
>

I like this solution because I want the scheme to be primarily
client-based.

Thanks!

Wolf
-- 
This Apt Has Super Cow Powers - http://sourcefreedom.com
Open-Source Software in Libraries - http://FOSS4Lib.org
Advancing Libraries Together - http://LYRASIS.org
Apache Open Office Developer wolfhalton at apache.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120713/55b732ea/attachment.html 


More information about the Ale mailing list