aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp27
1 files changed, 19 insertions, 8 deletions
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index ef3ec4bd..c987bb4d 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -75,20 +75,31 @@ if [ "${DEBUG}" = yes ] ; then
chatdbg="-v"
fi
-CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$DEVNAME
-[ -f $CHATSCRIPT ] || {
- CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$PARENTDEVNAME
-}
+if [ -z "$WVDIALSECT" ] ; then
+ CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$DEVNAME
+ [ -f $CHATSCRIPT ] || {
+ CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$PARENTDEVNAME
+ }
+else
+ CHATSCRIPT=
+fi
while : ; do
(logger -p daemon.info -t ifup-ppp \
"pppd started for $DEVICE on $MODEMPORT at $LINESPEED" &)&
> /var/run/ppp-$DEVICE.dev
- /usr/sbin/pppd -detach $opts $MODEMPORT $LINESPEED \
- remotename $DEVICE ipparam $DEVICE \
- ${PPPOPTIONS} \
- connect "/usr/sbin/chat $chatdbg -f $CHATSCRIPT"
+ if [ -n "$WVDIALSECT ] ; then
+ /usr/sbin/pppd -detach $opts $MODEMPORT $LINESPEED \
+ remotename $DEVICE ipparam $DEVICE \
+ ${PPPOPTIONS} \
+ connect "/usr/bin/wvdial --chat $WVDIALSECT"
+ else
+ /usr/sbin/pppd -detach $opts $MODEMPORT $LINESPEED \
+ remotename $DEVICE ipparam $DEVICE \
+ ${PPPOPTIONS} \
+ connect "/usr/sbin/chat $chatdbg -f $CHATSCRIPT"
+ fi
# 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