From owner-freebsd-questions Sun Jul 14 3:17:22 2002 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 B5E2C37B400 for ; Sun, 14 Jul 2002 03:17:18 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2D2143E31 for ; Sun, 14 Jul 2002 03:17:17 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.5/8.12.5) with ESMTP id g6EAHFbo025596; Sun, 14 Jul 2002 11:17:15 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.5/8.12.5/Submit) id g6EAHAiQ025595; Sun, 14 Jul 2002 11:17:10 +0100 (BST) Date: Sun, 14 Jul 2002 11:17:10 +0100 From: Matthew Seaman To: fred@timogen.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: which script will be executed when the adsl IP up Message-ID: <20020714101710.GA25158@happy-idiot-talk.infracaninophi> References: <007201bfef6b$e615f100$7f05a8c0@fred> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <007201bfef6b$e615f100$7f05a8c0@fred> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jul 16, 2000 at 02:21:54PM -0700, fred@timogen.com wrote: > I have use the adsl to connect the internet. As the ppp link > will be disconnect, I want the gateway the send me the new IPaddress > to my mail box. Could u tell me, when the ADSL link is up, which > scripts will be executed. > In linux that shoud be /etc/ppp/ip-up, I donnot know what is in > FreeBSD. You can use the /etc/ppp/ppp.linkup and /etc/ppp/ppp.linkdown files to cause commands to be executed when your link goes up or down. For instance, assuming that your ppp.conf is based on the default version, this ppp.linkup file will e-mail root an empty message with your new IP number in the subject line: # # Stuff to run when the PPP link comes up. # papchap: !bg mail -s "PPP link up IP = MYADDR" root