[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [MiNT] finding the IP in pppd
On Wed, 13 Oct 1999 Jo-Even.Skarstein@gjensidige.no wrote:
> I guess you can just use "route", but there are probably other
> programs/scripts available that simplifies this.
Here is the one I use. Easily customized.
#!/bin/sh
# script /etc/ppp/ip-up for MiNTOS
DEV=/dev/ttyv8
SOCKET=$1 ; PORT=$2 ; BAUD=$3 ; LOCAL_IP=$4 ; REMOTE_IP=$5
LOCAL_NAME=`nslookup $LOCAL_IP | grep Name | cut -d : -f 2 | tr -d " "`
echo $LOCAL_IP > /var/run/local_ip
echo $LOCAL_NAME > /var/run/local_name
echo "* Interface" $1 "using" $2 "at" $3 "baud is online." > $DEV
echo " Your IP ("$4") resolves to" $LOCAL_NAME > $DEV
#EoF
--
----------------------------------------------------------------
Martin-Éric Racine The Atari Stacy and TT030 Homepage
Lappeenranta, Finland http://members.tripod.com/~TT030/
----------------------------------------------------------------
"When the time comes, I will know and I shall be." Q-Funk