From owner-freebsd-questions Sun Nov 29 04:03:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA22157 for freebsd-questions-outgoing; Sun, 29 Nov 1998 04:03:29 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from caladan.tdx.co.uk (caladan.tdx.co.uk [195.188.177.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA22152 for ; Sun, 29 Nov 1998 04:03:25 -0800 (PST) (envelope-from kpielorz@tdx.co.uk) Received: from tdx.co.uk (lorca-tx.tdx.co.uk [195.188.177.242]) by caladan.tdx.co.uk (8.9.1/8.9.1) with ESMTP id MAA95017; Sun, 29 Nov 1998 12:03:09 GMT Message-ID: <366137FD.A8BCB4D7@tdx.co.uk> Date: Sun, 29 Nov 1998 12:03:09 +0000 From: Karl Pielorz Organization: TDX - The Digital eXchange X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Haischt CC: questions@FreeBSD.ORG Subject: Re: simple linkdown script References: <3661370D.41C67EA6@privat.toplink.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Haischt wrote: > > HIYA > > I want to do a simple linkdown script for my ppp connection. > > Can anybody tell me why the script below wont work? > > #!/bin/sh > # > # Simple linkdown script for ppp > # > kill 'cat /var/run/tun0.pid' > > If i just type cat /var/run/tun0.pid it shows me a valid PID, > but if I type kill 'cat /var/run/tun0.pid' or if I run the script above > I'll allways get the following err: > > kill: Arguments should be jobs or process id's Hi, I don't know too much about ppp - but isn't that script called after the link has been taken 'down', i.e. /var/run/tun0.pid is going to be non existant / emtpy? Try putting an: echo `cat /var/run/tun0.pid` >/tmp/test_ppp.pid Before it... Also make sure your using the right single quotes - you have the wrong one's in your original mail... (should both be ` not ') Regards, Karl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message