dustinrue / ControlPlane

ControlPlane - context-sensitive computing for OS X
http://www.controlplaneapp.com
BSD 3-Clause "New" or "Revised" License
1.76k stars 180 forks source link

Evidence Source: Internet connectivity #193

Open franciscolourenco opened 11 years ago

franciscolourenco commented 11 years ago

In alternative, a wildcard ip address should be supported in the existing "Assigned IP Address" evidence source.

This is because dhcp server might assign a different ip everytime, but we still want to know when we got connectivity in order to mount network drives.

dustinrue commented 11 years ago

Are you wanting an evidence source that is active if a given host is accessible?

franciscolourenco commented 11 years ago

That would also be interesting. But more importantly, an evidence source which becomes active when any ip is assigned to a given interface.

dustinrue commented 11 years ago

If you configure the IP evidence source rule correctly, it can match any IP in a range. You just need to set the subnet mask.

franciscolourenco commented 11 years ago

So you are saying the rule will turn positive for the entire network range depending on the network mask?

On Wednesday, 21 November 2012 at 18:56 , Dustin Rue wrote:

If you configure the IP evidence source rule correctly, it can match any IP in a range. You just need to set the subnet mask.

— Reply to this email directly or view it on GitHub (https://github.com/dustinrue/ControlPlane/issues/193#issuecomment-10609686).

dustinrue commented 11 years ago

Yes, the IP evidence source supports that.

franciscolourenco commented 11 years ago

thanks

On Sunday, 3 February 2013 at 15:40 , Dustin Rue wrote:

Yes, the IP evidence source supports that.

— Reply to this email directly or view it on GitHub (https://github.com/dustinrue/ControlPlane/issues/193#issuecomment-13048601).

ColdDevil commented 11 years ago

Oh, that's great! I tried to use wildcards via "*" in the first place but it didn't work. Maybe it would be good to mention this feature somewhere in the form for creating the "Assigned IP" rule. :)

garciparedes commented 7 years ago

Hi! I'm trying to create a rule that match with any IP assignation, but I didn't get it. Can anybody help me?

dustinrue commented 7 years ago

What are you trying to achieve?

garciparedes commented 7 years ago

I'm trying to create a rule to turns on a context when I have Internet.

dustinrue commented 7 years ago

The IP evidence source is meant to detect if you're in a specific IP range and not any range. The Attached Network Link evidence source would be the closest to what you're looking for. This evidence source should only be "true" when a link is actually connected. For example, if you connect to a WiFi access point but you don't get an IP address it won't be "true."