ppp/ip-up
2015-06-29 20:08:41 +03:00

39 lines
1.1 KiB
Bash

#!/bin/bash
# This file should not be modified -- make local changes to
# /etc/ppp/ip-up.local or put scripts in /etc/ppp/ip-up.d instead
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
LOGDEVICE=$6
REALDEVICE=$1
if [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ]; then
/etc/sysconfig/network-scripts/ifup-post --realdevice ${REALDEVICE} ifcfg-${LOGDEVICE}
else
[ -n "$DNS1" ] && echo "nameserver $DNS1 # ppp temp entry" >> /etc/resolv.conf
[ -n "$DNS2" ] && echo "nameserver $DNS2 # ppp temp entry" >> /etc/resolv.conf
fi
/etc/ppp/ip-up.ipv6to4 ${LOGDEVICE}
[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"
# These variables are for the use of the scripts run by run-parts
PPP_IFACE="$1"
PPP_TTY="$2"
PPP_SPEED="$3"
PPP_LOCAL="$4"
PPP_REMOTE="$5"
PPP_IPPARAM="$6"
export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
if [ -d /etc/ppp/ip-up.d/ -a -x /usr/bin/run-parts ]; then
/usr/bin/run-parts /etc/ppp/ip-up.d/
fi
if [ -x /usr/sbin/sendmail ];then
/usr/sbin/sendmail -q 2>/dev/null >/dev/null &
fi
exit 0