Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Jul 1998 01:21:58 +0100
From:      Brian Somers <brian@Awfulhak.org>
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 ? 
Message-ID:  <199807040021.BAA06172@awfulhak.org>
In-Reply-To: Your message of "Fri, 03 Jul 1998 14:36:11 %2B0200." <H000057c016b6bbc@MHS> 

next in thread | previous in thread | raw e-mail | index | archive | help
[.....]
>      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 <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807040021.BAA06172>