From owner-freebsd-questions Mon Sep 21 14:42:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA13999 for freebsd-questions-outgoing; Mon, 21 Sep 1998 14:42:14 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA13745 for ; Mon, 21 Sep 1998 14:40:52 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@woof.lan.awfulhak.org [172.16.0.7]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id WAA11469; Mon, 21 Sep 1998 22:40:03 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@localhost [127.0.0.1]) by woof.lan.awfulhak.org (8.9.1/8.9.1) with ESMTP id RAA18497; Mon, 21 Sep 1998 17:38:58 +0100 (BST) (envelope-from brian@woof.lan.awfulhak.org) Message-Id: <199809211638.RAA18497@woof.lan.awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: "Frank Griffith" cc: freebsd-questions@FreeBSD.ORG Subject: Re: ppp.linkup file won't execute command In-reply-to: Your message of "Sun, 20 Sep 1998 19:53:11 CDT." <012c01bde4fa$36069580$0200a8c0@fast1.dfw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Sep 1998 17:38:52 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I run FreeBSD 2.2.7 on a Pentium system. I use ppp to > hook-up dynamically to my ISP and run Apache 1.3.1. > > I want to have my system e-mail my dynamically assigned > IP number each time I hook-up. So following some much > needed advice, I added this line to the MYADDR section > of my /etc/ppp/ppp.linkup file: > > !bg ifconfig tun0 | mail -s "My Latest IP Address" me@my_domain.com Ppp doesn't do anything special with ``|''. You'll need !bg sh -c "ifconfig tun0 | mail -s "My latest IP address" me@my_domain.com But, I wouldn't do that ! Do this instead: !bg mail -s "Address (on INTERFACE) is MYADDR" me@my_domain.com Make sure you've got the latest ppp (within the last few weeks) as older versions won't expand MYADDR and INTERFACE if they're inside quotes. You can get the latest version via http://www.Awfulhak.org/ppp.html > Unfortunately, this does not work. So I made a script which > does the same thing and revised the above line to call > the script instead. But still no go. Can anyone offer some > advice on this? I'll bet you forgot ``#! /bin/sh'' (or whatever) at the top of your script. Ppp exec()s the command and exec() will fail without this. -- Brian , , Don't _EVER_ lose your sense of humour.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message