Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 765075520b7e2301273cd8365b4b03b2 > files > 9

tkseti-3.06-1mdk.i586.rpm

#!/bin/sh
#
# This file was created when you ran pppsetup: Mon May 17 14:40:27 PDT
1999
#
# This file /etc/ppp/ip-up is run by pppd when there's a
# successful ppp connection.
#
# Put any commands you want run after a successful connection
# in this file.
#
# Any commands you want printed to the screen should be directed
# to: >/dev/tty0
#
# Other commands should not be directed to: >/dev/tty0
#
# The companion file is /etc/ppp/ip-down, it's run when the PPP
# connection ends.
#
# The environment is cleared before executing this script
# so the path must be reset.
#
PATH=/usr/bin:/usr/sbin:/usr/local/bin:/sbin:/bin
export PATH

# This will print to the screen the local & remote IP address when you
# make a successful ppp connection.  $4 = Local IP $5 = Remote IP
#
# The CARRIER speed at which you connected will be reported, if it's in
# the /etc/ppp/report-chat file.  You also need the programs "tail"
# "cut" and "grep" for this to work.
# You may have to add W1 or S95=46 to your modem init string
# to get your modem to report the DCE = CARRIER speed.
# Examples: AT&FW1 or AT&FS95=46

# Added by Dave Lewis re: Rick Macdonald for TkSeti script
# Probably not needed, but won't hurt
rm /etc/ppp/ppp_is_up

if [ -s /etc/ppp/report-chat ]; then
if (tail -n 2 /etc/ppp/report-chat 2>/dev/null | grep CARRIER
>/dev/null) ; then
S="`tail -n 2 /etc/ppp/report-chat 2>/dev/null | grep CARRIER | cut
-b23-45 2>/dev/null`"
echo -n "$S" >/dev/tty0
echo " $4 > $5 $1" >/dev/tty0
else
echo " $4 > $5 $1" >/dev/tty0
fi
fi

# Added by Dave Lewis re: Rick Macdonald for TkSeti script
touch /etc/ppp/ppp_is_up

# If you want to ping the other end to keep the connection open.
# The output from ping will goto >/dev/null, you won't see it.
# Ping -i 60 = send ping every 60 seconds to remote = $5.

#(ping -i 60 $5 &) >/dev/null 2>&1

# If you want sendmail to send any mail in /var/spool/mqueue when
# you connect, remove the # below.

#sendmail -q

# If you want fetchmail to get your mail when you connect and check
# every 300 seconds = 5 minutes for mail, remove the # below.

#fetchmail -d 300

# End...