Date: Tue, 25 Jan 2000 19:22:09 +0000 From: Mark Ovens <mark@ukug.uk.freebsd.org> To: Ben Smithurst <ben@scientia.demon.co.uk> Cc: questions@freebsd.org Subject: Re: shell command not working in ppp.linkdown Message-ID: <20000125192209.A320@marder-1> In-Reply-To: <20000124234608.C5829@strontium.scientia.demon.co.uk> References: <20000124222421.E409@marder-1> <20000124234608.C5829@strontium.scientia.demon.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 24, 2000 at 11:46:08PM +0000, Ben Smithurst wrote: > Mark Ovens wrote: > > > I start xtimer from /etc/ppp/ppp.linkup using > > > > bg xtimer > > > > but trying to kill it in ppp.linkdown with: > > > > shell kill `cat /tmp/xtimer.pid` > > > > doesn't work (/tmp/xtimer.pid contains *only* the pid). No errors > > anywhere, xtimer just keeps running, however: > > > > shell killall xtimer > > > > does work. > > > > Anyone any idea why the former doesn't work? > > AIUI, PPP doesn't pass the command to /bin/sh, and it doesn't understand > the backticks. (I think this was the case at some point, though it may > have changed while I wasn't looking.) Try > > shell sh -c "kill `cat /tmp/xtimer.pid`" > > or something, does that work? That's it. Thanks:) It seems that ``shell'' doesn't behave as described in the manpage for ppp: shell|! [command] If command is not specified a shell is invoked according to the SHELL environment variable. Otherwise, the given command is executed. Word replacement is done in the same way as for the ``!bg'' command as described above. However, if I add isp: shell to /etc/ppp/ppp.linkup, I get marder-1:/usr/mark{58}% ppp Working in interactive mode Using interface: tun0 ppp ON marder-1> load isp ppp ON marder-1> dia ppp ON marder-1> Connect: Received: CONNECT 49333/ARQ Ppp ON marder-1> PPp ON marder-1> Warning: Can't start an interactive shell from a config file Warning: shell: Failed 1 PPP ON marder-1> Hmm, I'll try and look into this and, if necessary, update the manual page. Brian, are you reading this? If so, do you have any comments? > > -- > Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D -- "there's a long-standing bug relating to the x86 architecture that allows you to install Windows too" -Matthew D. Fuller ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000125192209.A320>