From owner-freebsd-questions Fri Jul 3 17:26:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA12997 for freebsd-questions-outgoing; Fri, 3 Jul 1998 17:26:23 -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 RAA12972 for ; Fri, 3 Jul 1998 17:26:14 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from gate.lan.awfulhak.org (brian@localhost [127.0.0.1]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id BAA06172; Sat, 4 Jul 1998 01:21:58 +0100 (BST) (envelope-from brian@gate.lan.awfulhak.org) Message-Id: <199807040021.BAA06172@awfulhak.org> X-Mailer: exmh version 2.0.1 12/23/97 To: THIERRY.HERBELOT@telspace.alcatel.fr cc: kpielorz@tdx.co.uk, freebsd-questions@FreeBSD.ORG Subject: Re: R p : Re: tcpdump on a dial-in PPP connection ? In-reply-to: Your message of "Fri, 03 Jul 1998 14:36:11 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Date: Sat, 04 Jul 1998 01:21:58 +0100 From: Brian Somers Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id RAA12985 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [.....] > I've got the following in /etc/ppp/ppp.linkup : > > MYADDR: > delete 0 > add 0 0 HISADDR > !bg tcpdump -l -i tun0 >> /tmp/tun0 > > but /tmp/tun0 stays empty [.....] Keep in mind that the program line is executed, and not parsed by any shell. You really want MYADDR: ..... !bg /etc/ppp/dodump INTERFACE and in /etc/ppp/dodump: #! /bin/sh exec tcpdump -l -i $1 >>/tmp/$1 This will work in interfaces other than tun0 (eg, tun1). If you've only got one tun device (making the ``which interface'' problem go away), you can simply MYADDR: ..... !bg sh -c "tcpdump -l -i tun0 >>/tmp/tun0" to make ``sh'' handle the ``>>''. -- 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