PDA

View Full Version : run a command when interface shows


DemoDoG
January 25th, 2009, 12:46
I use a 3g mobile modem and when I attach it I have a driver that automatically starts an interface called hso0.

I wonder if there is a simple way to make FreeBSD perform a certain command whenever network interface hso0 shows up? I would like it to run my connection program so I don't have to start it manually every time.

tingo
January 25th, 2009, 12:54
Not limited to network interfaces - works with all devices. Check out devd and devd.conf man pages. Basically, it can run commands (or scripts) on attach / detach of any device.

DemoDoG
January 26th, 2009, 13:07
Thanx alot it worked flawlessly. How I love fBSD :-)