From owner-FreeBSD-users-jp@jp.freebsd.org  Thu Sep 26 23:23:04 1996
Received: by mail.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) id XAA07531
	Thu, 26 Sep 1996 23:23:04 +0900 (JST)
Received: by mail.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) with ESMTP id XAA07526
	for <FreeBSD-users-jp@jp.freebsd.org>; Thu, 26 Sep 1996 23:22:54 +0900 (JST)
Received: from localhost.break.co.jp (localhost.break.co.jp [127.0.0.1]) by black.break.co.jp (8.7.5/3.4Wbeta6) with SMTP id XAA26672 for <FreeBSD-users-jp@jp.freebsd.org>; Thu, 26 Sep 1996 23:15:12 +0900 (JST)
Message-Id: <199609261415.XAA26672@black.break.co.jp>
X-Authentication-Warning: black.break.co.jp: Host localhost.break.co.jp [127.0.0.1] didn't use HELO protocol
To: FreeBSD-users-jp@jp.freebsd.org
From: godz-@mbox.kyoto-inet.or.jp
In-Reply-To: Your message of "Thu, 26 Sep 1996 18:59:57 +0900"
References: <199609260959.SAA08607@makioka.y-min.or.jp>
X-Mailer: Mew version 1.06 on Emacs 19.28.1, Mule 2.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Date: Thu, 26 Sep 1996 23:15:11 +0900
Reply-To: FreeBSD-users-jp@jp.freebsd.org
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: FreeBSD-users-jp 4883
Subject: [FreeBSD-users-jp 4883] Re: ppp-2.3b2 
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

$B1JED!s:#F|2q<R$r<-$a$F!"@2$l$F!"L5?&$K$J$j$^$7$?!w5~ET(B $B$G$9(B

From: MURATA Nobuhiro <nob@makioka.y-min.or.jp>
Subject: [FreeBSD-users-jp 4878] Re: ppp-2.3b2 
Date: Thu, 26 Sep 1996 18:59:57 +0900
Message-ID: <199609260959.SAA08607@makioka.y-min.or.jp>

nob> > $B$&$A$G$O!"(Bcrontab$B$G(Barp$B$r(Bdelete$B$7$F$$$C$F$^$9!#!J86;OE*$@$1$I!K(B
nob> > $B$?$@!"(Bnetstat$B$G%;%C%7%g%s$,A4It>C$($J$1$l$P!"%@%a$_$?$$$G!"(B
nob> > $B>C$7$F$b>C$7$F$bI|5"$7$F$-$^$9!#(B(^^;)
nob> 
nob> $B;d$N$H$3$m$b$=$N$h$&$K$7$F$$$^$9!#(B

$B$b$C$H86;OE*$+$bCN$l$^$;$s$,!"(Bip-up$B$N%9%/%j%W%H$G0lC6!"A4$F(Barp$B$r>C$7$F!"(B
$B<+J,$G!"(Barp$B%(%s%H%j$H!"(Bifconfig$B$r$d$C$F$^$9!#(B
# $B$+$J$j6/0z$+$b(B...
crontab$B$G>C$7$F$b!"%?%$%_%s%0$G$O(B imcomplete $B$N%(%s%H%j$,=P$FMh$k2DG=(B
$B@-$,$"$k$+$bCN$l$J$$!)(B $B$H;W$C$?$N$G!#(B
$BMxE@$O!"(Bcron $B$GF0$+$9I,MW$,L5$$$+$i!"%7%9%F%`$NIi2Y$,$A$g$H$O$^$7$K$J(B
$B$k!#(B
$B7gE@$O!"(Bpppd$B$N@\B3;~$K6/0z$K<+J,$G@_Dj$7$F$7$^$&$N$G!"$D$J$,$k;~$K$A$g$C(B
$B$HM>J,$J;~4V$,$+$+$k!#$^$"!"$=$s$J$K5$$K$9$kDx$N$3$H$G$O$J$$$+$bCN$l$J(B
$B$$$1$I!#(B

$B0J2<;29M$^$G$K(B

--------------------$B$3$3$+$i(B--------------------
#!/bin/sh 
# -*- Fundamental -*-
#
#
# args: interface-name tty-device speed local-IP remote-IP
# delete arp  if exist 2 item for $dip

ppp=$1
dev=$2
sip=$4
dip=$5
logfile=/var/log/pppd.log
logfile2=/var/log/pppd.err

if [ $dip = "0.0.0.0" ]
then
	/bin/echo "dip = $dip" >> $logfile
	exit 0
fi

if [ $sip = "0.0.0.0" ]
then
	/bin/echo "sip = $sip" >> $logfile
	exit 0
fi

cnt=`/usr/sbin/arp -a | grep $dip | wc -l`
if [ $cnt -eq 2 ]
then
	/usr/sbin/arp -d $dip >> $logfile 2>&1
elif [ $cnt -eq 1 ]
then
	cnt=`/usr/sbin/arp $dip | grep incomplete | wc -l`
	if [ $cnt -eq 1 ]
	then
		/usr/sbin/arp -d $dip >> $logfile 2>&1
		/usr/sbin/arp -s $dip `/usr/sbin/arp $sip | /usr/bin/awk '{print $4}'` pub >> $logfile 2>&1
	fi
else
	/usr/sbin/arp -s $dip `/usr/sbin/arp $sip | /usr/bin/awk '{print $4}'` pub >> $logfile 2>&1
fi

/sbin/route add $dip 127.0.0.1 -iface >> $logfile 2>&1

#
# Send any mail that has been queued while the link
# was down.


/usr/sbin/arp $dip >> $logfile 2>&1
/usr/bin/netstat -nr | /usr/bin/grep $dip >> $logfile 2>&1

--------------------$B$3$3$^$G(B--------------------

$B$D$$$G$K!"(Bip-down$B$O$3$s$J46$8$G$9(B

--------------------$B$3$3$+$i(B--------------------
#!/bin/sh -x
# -*- Fundamental -*-
#
# args: interface-name tty-device speed local-IP remote-IP

ppp=$1
dev=$2
sip=$4
dip=$5

logfile=/var/log/pppd.log

if [ $dip = "0.0.0.0" ]
then
	echo "dip = $dip" >> $logfile
	exit 0
fi

if [ $sip = "0.0.0.0" ]
then
	echo "sip = $sip" >> $logfile
	exit 0
fi

#
# Remove the route to localhost that we created in ip-up
#
/sbin/route delete $dip >> $logfile 2>&1
/sbin/route delete $dip >> $logfile 2>&1


--------------------$B$3$3$^$G(B--------------------


$B0l1~!"$3$l$G!"AGD>$KF0$$$F$^$9!#(B

# /etc/sendmail.cf$B$N@_Dj$,$^$@ESCf$J$N$G!"$&$^$/=P$F$$$C$F$/$l$k$+!"(B
# $B$A$g$C$H?4G[(B

--------
 "We're so glad to see so many of you lovely people here tonight. And
we would especially like to welcome all the representatives of the
California Highway Patrol who are waiting for me and Jake after the
show ..."
---------------$B1JED(B $BK'5W(B/Yoshihisa Nagata <godz-@mbox.kyoto-inet.or.jp>
