From owner-freebsd-questions Sun Jul 14 7:41:15 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 6A24037B400 for ; Sun, 14 Jul 2002 07:41:12 -0700 (PDT) Received: from leviathan.xo.com (leviathan.xo.com [207.155.252.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1487643E65 for ; Sun, 14 Jul 2002 07:41:12 -0700 (PDT) (envelope-from fred@timogen.com) Received: from fred ([61.165.90.144]) by leviathan.xo.com id KAA14778; Sun, 14 Jul 2002 10:40:49 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] From: fred@timogen.com Message-ID: <003901bfefb2$2c480dc0$905aa53d@fred> To: "Matthew Seaman" Cc: References: <007201bfef6b$e615f100$7f05a8c0@fred> <20020714101710.GA25158@happy-idiot-talk.infracaninophi> Subject: Re: which script will be executed when the adsl IP up Date: Sun, 16 Jul 2000 22:44:34 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 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 Greate! Thanks. ----- Original Message ----- From: "Matthew Seaman" To: Cc: Sent: Sunday, July 14, 2002 3:17 AM Subject: Re: which script will be executed when the adsl IP up > 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 # > # That's All Folks! > # > > The special token "MYADDR" is replaced by the new IP number. The > ppp(8) man page has details of all such tokens in the description of > the `!bg' command in the extensive "PPP COMMAND LIST" section. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks > Savill Way > Tel: +44 1628 476614 Marlow > Fax: +44 0870 0522645 Bucks., SL7 1TH UK > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message