From cf35c506c018452c71e6eae2eb8425c5ab266005 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 14 Jan 2003 03:43:01 +0000 Subject: fix ifup-ppp for use with dial-on-demand (#54680) --- sysconfig/network-scripts/ifup-ppp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp index 9a869479..d6898357 100755 --- a/sysconfig/network-scripts/ifup-ppp +++ b/sysconfig/network-scripts/ifup-ppp @@ -15,7 +15,11 @@ else [ -f "${CONFIG}" ] || CONFIG=ifcfg-${1} source_config # don't start ppp-watch by xDSL - [ "$TYPE" = "xDSL" ] || exec /sbin/ppp-watch "${DEVICE}" "$@" + if [ "${DEMAND}" != yes -a "$TYPE" != "xDSL" ] ; then + # let ppp-watch do the right thing + shift + exec /sbin/ppp-watch "${DEVICE}" "$@" + fi fi CONFIG=$1 @@ -130,12 +134,14 @@ fi if [ ${DEMAND} = yes ] ; then opts="$opts demand ktune idle ${IDLETIMEOUT} holdoff ${RETRYTIMEOUT}" +else + opts="$opts nodetach" fi (logger -p daemon.info -t ifup-ppp \ $"pppd started for ${DEVNAME} on ${MODEMPORT} at ${LINESPEED}" &)& -exec pppd -detach $opts ${MODEMPORT} ${LINESPEED} \ +exec pppd $opts ${MODEMPORT} ${LINESPEED} \ ipparam ${DEVNAME} linkname ${DEVNAME} call ${DEVNAME}\ noauth \ ${PPPOPTIONS} -- cgit v1.2.1