From 969968447db802f55acc6587cbb399ac6afde5d3 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 25 Apr 2005 16:54:40 +0000 Subject: fix static routes with ppp demand dialing (#20142, ) --- sysconfig/network-scripts/ifup-ppp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts') diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp index 2e7e8184..56d2104e 100755 --- a/sysconfig/network-scripts/ifup-ppp +++ b/sysconfig/network-scripts/ifup-ppp @@ -141,7 +141,17 @@ fi (logger -p daemon.info -t ifup-ppp \ $"pppd started for ${DEVNAME} on ${MODEMPORT} at ${LINESPEED}" &)& -exec pppd $opts ${MODEMPORT} ${LINESPEED} \ +pppd $opts ${MODEMPORT} ${LINESPEED} \ ipparam ${DEVNAME} linkname ${DEVNAME} call ${DEVNAME}\ noauth \ - ${PPPOPTIONS} + ${PPPOPTIONS} || exit + +if [ "${DEMAND}" = "yes" ] ; then + # pppd is a tad slow to write the pid-file. + sleep 2 + if [ -f /var/run/ppp-${DEVNAME}.pid ] ; then + REALDEVICE=`tail -1 /var/run/ppp-${DEVNAME}.pid` + /etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME} + fi +fi + -- cgit v1.2.1