aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-25 16:54:40 +0000
committerBill Nottingham <notting@redhat.com>2005-04-25 16:54:40 +0000
commit969968447db802f55acc6587cbb399ac6afde5d3 (patch)
tree9242d3c07ca50ee6fcd2c56213c7c8d82396f3f0 /sysconfig
parent510d9cf6f2cb57e6e60fdc4dc9ae855665852072 (diff)
downloadinitscripts-969968447db802f55acc6587cbb399ac6afde5d3.tar
initscripts-969968447db802f55acc6587cbb399ac6afde5d3.tar.gz
initscripts-969968447db802f55acc6587cbb399ac6afde5d3.tar.bz2
initscripts-969968447db802f55acc6587cbb399ac6afde5d3.tar.xz
initscripts-969968447db802f55acc6587cbb399ac6afde5d3.zip
fix static routes with ppp demand dialing (#20142, <ohrn+redhat@chalmers.se>)
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp14
1 files changed, 12 insertions, 2 deletions
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
+