[Nottingham] Two Entries in /etc/hosts

Richard Parsons rp at redwoodlegal.co.uk
Thu Apr 28 11:01:05 UTC 2016


Thanks for the input Jason. Is it really the case that the hostname command
can set other entries in /etc/hosts (which is what I want to do)? I thought
it could only set the hostname of the machine it was running.

Looks like I could use netctl to run an arbitrary command upon connection
to a home network:
https://wiki.archlinux.org/index.php/netctl#Execute_commands_on_established_connection

I've used wicd before. Maybe I'll go back to it if I can't get netctl to do
what I want.

On Thu, Apr 28, 2016 at 11:46 AM, Jason Irwin <jasonirwin73 at gmail.com>
wrote:

> Ah....the venerable VM SuperFlub. They work (kinda), but I'm not sure
> how they deal with their WAN IP being used from the LAN side. Badly,
> if your experience is anything to go by!
> I use a Buffalo AirStation with the VM box in modem-mode. Works well
> enough for my purposes but I'd not recommend one.
> As to DD-WRT; I'd check OpenWRT compatibility before buying. I am
> informed OpenWRT is superior an have every intention of trying it out.
>
> Getting/Setting the hostname is done with "hostname". Setting needs
> elevate privileges which your script may or may not depending on how
> it gets run.
>
> "netcfg current" tells you which profiles are running and that would
> seem to be the way to find out if you're home or not.
> The up/down stuff is bound to the actual interface rather than
> profile. So I don't think that will detect a profile switch.
>
> "/etc/hosts" really is for static stuff, this dynamic IP should
> probably be set in dnsmasq, bind9 or whatever you use
> ("address=/blah/1.2.3.4" etc) and that have it reload/restart.
>
> What about running "wicd"?
> https://wiki.archlinux.org/index.php/wicd#Scripts
> I guess other GUIs may have similar support.
>
> Can't help but think there has to be a really easy way to run
> something based on a profile switch. Seems like an obvious thing to
> want to do.
> Just can't find anything.
>
> J.
> WARNING: DO NOT take network advice from this man.
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>



-- 
Redwood Legal
rp at redwoodlegal.co.uk
Office: 02030 956010
138-140 Southwark Street, London, SE1 0SW

This firm is authorised and regulated by the Solicitors Regulation
Authority (SRA ID 427552)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/nottingham/attachments/20160428/cb2f184e/attachment.html>


More information about the Nottingham mailing list