aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp25
1 files changed, 18 insertions, 7 deletions
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index 2b4b4a8c..9e3a20af 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -1,20 +1,24 @@
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
+cd /etc/sysconfig/network-scripts
+. network-functions
+
# ifup-post for PPP is handled through /etc/ppp/ip-up
if [ "$1" != daemon ] ; then
# just in case a full path to the configuration file is passed in
- ifcfg=$(basename $1)
- shift
- # let ppp-watch do the right thing
- exec /sbin/ppp-watch "$ifcfg" "$@"
+ CONFIG=$(basename $1)
+ [ -f "$CONFIG" ] || CONFIG=ifcfg-$1
+ source_config
+ if [ "$DEMAND" != yes ] ; then
+ shift
+ # let ppp-watch do the right thing
+ exec /sbin/ppp-watch "$ifcfg" "$@"
+ fi
fi
shift
-cd /etc/sysconfig/network-scripts
-. network-functions
-
CONFIG=$1
[ -f "$CONFIG" ] || CONFIG=ifcfg-$1
source_config
@@ -80,6 +84,13 @@ if [ "${DEBUG}" = yes ] ; then
opts="$opts debug"
chatdbg="-v"
fi
+if [ ${DEMAND} != yes ] ; then
+ if [ -n "${IDLETIMEOUT}" ] ; then
+ opts="$opts demand idle ${IDLETIMEOUT}"
+ else
+ opts="$opts demand idle 600"
+ fi
+fi
if [ -z "$WVDIALSECT" ] ; then
CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$DEVNAME