Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2012 13:12:37 +0200
From:      Damien Fleuriot <ml@my.gd>
To:        freebsd-questions@freebsd.org
Subject:   Re: Trigger action on link state change
Message-ID:  <4FDB18A5.6020004@my.gd>
In-Reply-To: <op.wfxwv1a6g7njmm@michael-think>
References:  <op.wfxwv1a6g7njmm@michael-think>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/15/12 12:32 PM, Michael Ross wrote:
> 
> Hi all,
> 
> i was wondering if there is any ready-made method to trigger an action
> as soon as a link changes state.
> Along the lines of
>     onifdown_em0="/run/this/script"
> in rc.conf
> 
> Background:
> Discussing physical data security with a client yesterday: The machine
> has to run 24/7. The filesystem is encrypted on boot, but this doesn't
> help a lot if anybody brings an AC generator to steal the machine *AND*
> the UPS. Best point in time to lock the machine I could think of was
> when somebody pulls the NIC cable.
> 
> Regards,
> 
> Michael


Aside from Matthias' suggestion of devd, you may want to also look up
ifstated.

We actually use it in production to send nagios passive alerts on CARP
status change and LAGG interface loss of fault tolerance.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FDB18A5.6020004>