aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-ppp
diff options
context:
space:
mode:
authorMichael K. Johnson <johnsonm@redhat.com>1997-09-18 19:49:46 +0000
committerMichael K. Johnson <johnsonm@redhat.com>1997-09-18 19:49:46 +0000
commitb49499f63193f2e1be55badd92b0c7ed203e8dc7 (patch)
treeaf452ce5d2aa3fbeef0dca5cba6fdfa906376196 /sysconfig/network-scripts/ifup-ppp
parent474a704b1a42ce6d44a79b6dacf06d9ba2b780ad (diff)
downloadinitscripts-b49499f63193f2e1be55badd92b0c7ed203e8dc7.tar
initscripts-b49499f63193f2e1be55badd92b0c7ed203e8dc7.tar.gz
initscripts-b49499f63193f2e1be55badd92b0c7ed203e8dc7.tar.bz2
initscripts-b49499f63193f2e1be55badd92b0c7ed203e8dc7.tar.xz
initscripts-b49499f63193f2e1be55badd92b0c7ed203e8dc7.zip
Support alternative device configurations.
Diffstat (limited to 'sysconfig/network-scripts/ifup-ppp')
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp12
1 files changed, 10 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index 7b5cb377..9d09038f 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -1,6 +1,9 @@
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
+CONFIG=$1
+. network-functions
+
# ifup-post for PPP is handled through /etc/ppp/ip-up
if [ "$1" != daemon ] ; then
@@ -10,7 +13,7 @@ fi
shift
-. $1
+source_config
if [ -z "$DISCONNECTTIMEOUT" ]; then
DISCONNECTTIMEOUT=2
@@ -67,6 +70,11 @@ if [ -n "${DEBUG}" ] ; then
opts="$opts debug"
fi
+CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$DEVNAME
+[ -f $CHATSCRIPT ] || {
+ CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$PARENTDEVNAME
+}
+
while : ; do
(logger -p daemon.info -t ifup-ppp \
"pppd started for $DEVICE on $MODEMPORT at $LINESPEED" &)&
@@ -75,7 +83,7 @@ while : ; do
/usr/sbin/pppd -detach $opts $MODEMPORT $LINESPEED \
remotename $DEVICE ipparam $DEVICE \
${PPPOPTIONS} \
- connect "/usr/sbin/chat ${DEBUG:+-v} -f /etc/sysconfig/network-scripts/chat-$DEVICE"
+ connect "/usr/sbin/chat ${DEBUG:+-v} -f $CHATSCRIPT"
# exit if we're not supposed to persist or our lock file has disappeared
if [ "$PERSIST" != "yes" -o ! -f /var/run/ppp-$DEVICE.dev ]; then