*BSD News Article 99263


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.ysu.edu!news.radio.cz!nntprelay.mathworks.com!howland.erols.net!newsfeed.internetmci.com!news.javanet.com!not-for-mail
From: Jack <harpo@javanet.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: ppp -> shell script problems
Date: Wed, 09 Jul 1997 04:41:16 -0400
Organization: JavaNet Cafe
Lines: 27
Message-ID: <33C34EAC.41C67EA6@javanet.com>
NNTP-Posting-Host: noho-us127.javanet.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.1.5-RELEASE i386)
CC: freebsd-questions@freebsd.org
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:44153

I'm having a little more trouble than I anticipated calling a shell
script from my ppp.linkup. In essence, what I want to do is get the
value in MYADDR into a text file, say ~/data which I can then upload to
my isp shell account, so I can access this machine from the outside
world (dynamic ip).
I'm running FBSD 2.1.5 with PPP-2.2-970629 installed.
Here's the relavent line from /etc/ppp/ppp.linkup:
! sh -c "/usr/home/jack/ipinfo MYADDR > /usr/home/jack/data &"
(This is the last line in ppp.linkup)
--
ipinfo is very simple so far:
#!/bin/sh
echo My current IP address is $1
---

I don't think sh likes the "-c" option. In fact, I didn't see it listed
under my man pages! I've tried "-x" as well, but that didn't do anything
more.

In short, this script doesn't seem to be getting called. (~/data does
not get updated. However, if I run "./ipinfo 127.0.0.1 > data" in my
home directory, that works!"

I'd appreciate ANY thoughts/ideas/etc.

TIA,
John Szumowski