# run a command when interface shows



## DemoDoG (Jan 25, 2009)

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 (Jan 25, 2009)

Not limited to network interfaces - works with all devices. Check out devd(8) and devd.conf(5) man pages. Basically, it can run commands (or scripts) on attach / detach of any device.


----------



## DemoDoG (Jan 26, 2009)

Thanx alot it worked flawlessly. How I love fBSD


----------

