aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-01-14 03:43:01 +0000
committerBill Nottingham <notting@redhat.com>2003-01-14 03:43:01 +0000
commitcf35c506c018452c71e6eae2eb8425c5ab266005 (patch)
treedb21047b2a7d0a9172edd9410acbdbb654636e2b /sysconfig/network-scripts
parent05b18f83a02fd7daadb95bb469f785d231463762 (diff)
downloadinitscripts-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')
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp10
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}