Archive for October, 2010

Using crankd to Respond to Network Events

If you're not familiar with the Pymacadmin project – you should be.  Nigel Kersten and Chris Adams have created an awesome tool called crankd that will let you execute Python code or shell scripts in response to system events.

What does this mean to you?

Do you have laptop users that are bound to OD or AD?  Do they ever leave your network and get the spinning beachball as their computers try to authenticate or otherwise contact your LDAP servers?  Crankd can sense a network change, which will allow you to write code that removes search paths when your users are OFF your network, and add those search paths when your users RETURN to your network.  Awesome.

Do you have users that VPN to your corporate network?  Crankd will let you execute code to kill and resume the VPN when the computer sleeps or wakes.

Maybe you use a Configuration Management System like Chef or Puppet and you would like laptops to check in with your CMS when they connect to the network (think of laptop carts in education or infrequently used laptops elsewhere).  Crankd can make this happen.

All these problems can be solved by implementing and tweaking crankd.  It's not terribly difficult, and I wrote an article that shows you how to do it here.

Read more