From owner-freebsd-questions Tue Jan 25 11:29:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from typhoon.mail.pipex.net (typhoon.mail.pipex.net [158.43.128.27]) by hub.freebsd.org (Postfix) with SMTP id 2E91C1526E for ; Tue, 25 Jan 2000 11:28:52 -0800 (PST) (envelope-from mark@dogma.freebsd-uk.eu.org) Received: (qmail 13524 invoked from network); 25 Jan 2000 19:28:47 -0000 Received: from userak06.uk.uudial.com (HELO marder-1.) (62.188.133.234) by smtp.dial.pipex.com with SMTP; 25 Jan 2000 19:28:47 -0000 Received: (from mark@localhost) by marder-1. (8.9.3/8.9.3) id TAA01110; Tue, 25 Jan 2000 19:22:09 GMT (envelope-from mark) Date: Tue, 25 Jan 2000 19:22:09 +0000 From: Mark Ovens To: Ben Smithurst Cc: questions@freebsd.org Subject: Re: shell command not working in ppp.linkdown Message-ID: <20000125192209.A320@marder-1> References: <20000124222421.E409@marder-1> <20000124234608.C5829@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000124234608.C5829@strontium.scientia.demon.co.uk> Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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