From owner-freebsd-questions@FreeBSD.ORG Mon Mar 20 11:20:14 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38AA516A400 for ; Mon, 20 Mar 2006 11:20:14 +0000 (UTC) (envelope-from evil_ftw@hotmail.com) Received: from hotmail.com (bay104-f33.bay104.hotmail.com [65.54.175.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id E29B343D45 for ; Mon, 20 Mar 2006 11:20:13 +0000 (GMT) (envelope-from evil_ftw@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 20 Mar 2006 03:20:13 -0800 Message-ID: Received: from 65.54.175.200 by by104fd.bay104.hotmail.msn.com with HTTP; Mon, 20 Mar 2006 11:20:12 GMT X-Originating-IP: [85.239.177.182] X-Originating-Email: [evil_ftw@hotmail.com] X-Sender: evil_ftw@hotmail.com In-Reply-To: <1142849183.4133.36.camel@siseci.gdg.gov.tr> From: "Evil I_Am" To: freebsd-questions@freebsd.org Date: Mon, 20 Mar 2006 12:20:12 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 20 Mar 2006 11:20:13.0549 (UTC) FILETIME=[41E719D0:01C64C10] Subject: Re: Automatic interface down 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: Mon, 20 Mar 2006 11:20:14 -0000 I am trying it,but i still have problems. Here is my ifstated.conf: init-state up loglevel debug link_down = "em0.link.down" link_up = "em0.link.up" net = '( "ping -q -c 1 -t 1 XXX.XXX.XXX.XXX > /dev/null" every 10 && \ "ping -q -c 1 -t 1 XXX.XXX.XXX.XXX > /dev/null" every 10)' state auto { if $link_up { set-state up } if $link_down { set-state down } } state up { init { run "ifconfig em0 up" } } state down { init { run "ifconfig em0 down" } } (of course i put the real IPs in the file :) )but running ifstated -nv i obtain: /usr/local/etc/ifstated.conf:1: syntax error link_down = "em0.link.down" link_up = "em0.link.up" net = "( "ping -q -c 1 -t 1 XXX.XXX.XXX.XXX > /dev/null" every 10 && "ping -q -c 1 -t 1 XXX.XXX.XXX.XXX > /dev/null" every 10)" /usr/local/etc/ifstated.conf:14: syntax error /usr/local/etc/ifstated.conf:17: syntax error /usr/local/etc/ifstated.conf:23: syntax error /usr/local/etc/ifstated.conf:26: syntax error /usr/local/etc/ifstated.conf:31: syntax error /usr/local/etc/ifstated.conf:34: syntax error I checked against the provided sample file and everything looks ok to me; have someone some suggestion on how to make ifstated work or on some better mechanins to use? Thx Ivan >From: "N. Ersen SISECI" >To: Evil I_Am >Subject: Re: Automatic interface down >Date: Mon, 20 Mar 2006 12:06:23 +0200 > >Hi, > >You may try net/ifstated port. > > >-- >N. Ersen SISECI >http://www.enderunix.org > > >Pts, 2006-03-20 tarihinde 10:53 +0100 saatinde, Evil I_Am yazdı: > > > Hi > > I'd like to know if there is a way to automatically put a net interface >down > > when the cable is unplugged. I know i could make a cronned job to check >for > > it periodically,but i see this as a last restort > > > > Hi and thx > > Ivan > > > > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to >"freebsd-questions-unsubscribe@freebsd.org" > >