From owner-freebsd-questions@FreeBSD.ORG Fri Jun 15 11:12:45 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFEE21065670 for ; Fri, 15 Jun 2012 11:12:45 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5688FC0A for ; Fri, 15 Jun 2012 11:12:45 +0000 (UTC) Received: by eabm6 with SMTP id m6so1000748eab.13 for ; Fri, 15 Jun 2012 04:12:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=/swa/j4IZ2zcndTtfduF7/e/cNKDCjxwd+Qxhv77JHM=; b=PcJ5yD1X43GSdJjAA0qHugftrWU0dpuI47TXZajh5zdLcZr+bjhWjVDkeTueaOUlOG K4Sk8qOwCyYkKJzsZJiScsDzUhGFCGmn1tUnh5fILhNgfGM1KSIGtd4SdSsv5lMYXhZr s4Q5hbiBy16hJ0kRm0wraEhWCUKzdibpIx8t6HH/rVKkDyXfZJ12Ed/yvGedM6+gyTXG gwkSZryniRCuZd81l2U6JZm7Li+NcGKeBf1/3X1R3eGxMc6Ec+mEn3aFPvY9ZzGbVoxo v2pB4E429GFkAet2tUorIYfaqlWAbHGMBl5fqer9tzdurM1w7iXTd8GvYPwrpq+btrT/ lt9w== Received: by 10.14.45.68 with SMTP id o44mr1345569eeb.66.1339758764181; Fri, 15 Jun 2012 04:12:44 -0700 (PDT) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id e45sm29690650eeb.6.2012.06.15.04.12.38 (version=SSLv3 cipher=OTHER); Fri, 15 Jun 2012 04:12:38 -0700 (PDT) Message-ID: <4FDB18A5.6020004@my.gd> Date: Fri, 15 Jun 2012 13:12:37 +0200 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkc3IRj7NfTgtyHEqlfX31xGaqUZVDGF5Cn25vSrZ/eshoKbSTo6yjFcV6ZxRwgJ9SsLIMd Subject: Re: Trigger action on link state change X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2012 11:12:45 -0000 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.