diff options
author | Bill Nottingham <notting@redhat.com> | 2003-01-14 03:43:01 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2003-01-14 03:43:01 +0000 |
commit | cf35c506c018452c71e6eae2eb8425c5ab266005 (patch) | |
tree | db21047b2a7d0a9172edd9410acbdbb654636e2b /sysconfig/network-scripts/ifup-ppp | |
parent | 05b18f83a02fd7daadb95bb469f785d231463762 (diff) | |
download | initscripts-cf35c506c018452c71e6eae2eb8425c5ab266005.tar initscripts-cf35c506c018452c71e6eae2eb8425c5ab266005.tar.gz initscripts-cf35c506c018452c71e6eae2eb8425c5ab266005.tar.bz2 initscripts-cf35c506c018452c71e6eae2eb8425c5ab266005.tar.xz initscripts-cf35c506c018452c71e6eae2eb8425c5ab266005.zip |
fix ifup-ppp for use with dial-on-demand (#54680)
Diffstat (limited to 'sysconfig/network-scripts/ifup-ppp')
-rwxr-xr-x | sysconfig/network-scripts/ifup-ppp | 10 |
1 files changed, 8 insertions, 2 deletions
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} |