diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2000-06-16 07:26:09 +0000 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2000-06-16 07:26:09 +0000 |
commit | f40053d24d03db47996783f3d33b28e29fbb8e7e (patch) | |
tree | 67d4695abee63cd7679e181870ab387847dc33e0 /sysconfig/network-scripts | |
parent | 96c8fb6e84100e4f6999286466707c4b27b9318b (diff) | |
download | initscripts-f40053d24d03db47996783f3d33b28e29fbb8e7e.tar initscripts-f40053d24d03db47996783f3d33b28e29fbb8e7e.tar.gz initscripts-f40053d24d03db47996783f3d33b28e29fbb8e7e.tar.bz2 initscripts-f40053d24d03db47996783f3d33b28e29fbb8e7e.tar.xz initscripts-f40053d24d03db47996783f3d33b28e29fbb8e7e.zip |
sysconfig/network-scripts/ifup-ppp: add hooks for demand-dialing PPP
rc.d/init.d/functions: use basename of process when looking for its PID file
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup-ppp | 25 |
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 |