aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-ippp
diff options
context:
space:
mode:
authorThan Ngo <than@redhat.com>2005-09-26 08:57:52 +0000
committerThan Ngo <than@redhat.com>2005-09-26 08:57:52 +0000
commitfab90b3e6455472d561d94da40093726656a992f (patch)
treef3f98b599560f4e931f15bbd60289fa056b895b4 /sysconfig/network-scripts/ifup-ippp
parentfb072b8c1cacba318db7fe70f99463e55c617cce (diff)
downloadinitscripts-fab90b3e6455472d561d94da40093726656a992f.tar
initscripts-fab90b3e6455472d561d94da40093726656a992f.tar.gz
initscripts-fab90b3e6455472d561d94da40093726656a992f.tar.bz2
initscripts-fab90b3e6455472d561d94da40093726656a992f.tar.xz
initscripts-fab90b3e6455472d561d94da40093726656a992f.zip
support proper dial-in configuration, thanks to Peter Bieringer (#158380)r8-15
Diffstat (limited to 'sysconfig/network-scripts/ifup-ippp')
-rwxr-xr-xsysconfig/network-scripts/ifup-ippp19
1 files changed, 16 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp
index 7a72a333..0defdeb6 100755
--- a/sysconfig/network-scripts/ifup-ippp
+++ b/sysconfig/network-scripts/ifup-ippp
@@ -111,10 +111,11 @@ function addprovider()
# set authentication
_auth=`echo "$AUTH" | sed 's/[a-z -]*//g'`
if [ -n "$_auth" ]; then
- if [ -z "$USER" ]; then
+ if [ -z "$USER" -a "$DIALIN" != "on" ]; then
log_echo " Error: $1 (syncppp) user is not set"
return 1
fi
+ if [ "$DIALIN" != "on" ]; then
# we should hide the user name, so i add user name to option file.
if [ "$AUTH" = "-pap +chap" ]; then
create_option_file "name \"$USER\""
@@ -122,6 +123,7 @@ function addprovider()
create_option_file "user \"$USER\""
fi
options="$options file /etc/ppp/ioption-secret-$DEVICE"
+ fi
# authentication options:
# +pap and/or +chap does not work correct by dialout - remove
@@ -185,7 +187,9 @@ function addprovider()
if [ "$IPADDR" = "0.0.0.0" ]; then
options="$options ipcp-accept-local"
else
+ if [ "$DIALIN" != "on" ]; then
options="$options noipdefault"
+ fi
fi
# Add device
options="$options /dev/$DEVICE"
@@ -203,7 +207,12 @@ function addprovider()
[ -z "$SLAVE_DIALMAX" ] && SLAVE_DIALMAX="$DIALMAX"
[ -z "$SLAVE_CALLBACK" ] && SLAVE_CALLBACK="$CALLBACK"
[ -z "$SLAVE_CBDELAY" ] && SLAVE_CBDELAY="$CBDELAY"
- [ -z "$SLAVE_DIALMODE" ] && SLAVE_DIALMODE="auto"
+ if [ "$DIALIN" != "on" ] ; then
+ [ -z "$SLAVE_DIALMODE" ] && SLAVE_DIALMODE="auto"
+ else
+ # Master should not dial by default on incoming MPPP
+ [ -z "$SLAVE_DIALMODE" ] && SLAVE_DIALMODE="$DIALMODE"
+ fi
slave=$SLAVE_DEVICE
options="$options /dev/$slave +mp"
@@ -249,7 +258,9 @@ function addprovider()
fi
if [ "$GATEWAY" = "0.0.0.0" ]; then
+ if [ "$DIALIN" != "on" ]; then
options="$options ipcp-accept-remote"
+ fi
options="$IPADDR:$GATEWAY $options"
else
options="$options $IPADDR:$GATEWAY"
@@ -336,7 +347,9 @@ function addprovider()
ipppd $options $netmask >/dev/null 2>&1
# start ibod daemon
- [ "$BUNDLING" = "yes" -o "$BUNDLING" = "on" ] && [ -n "$SLAVE_DEVICE" ] && start_ibod $DEVICE
+ if [ "$DIALIN" != "on" ]; then
+ [ "$BUNDLING" = "yes" -o "$BUNDLING" = "on" ] && [ -n "$SLAVE_DEVICE" ] && start_ibod $DEVICE
+ fi
fi
# set default gateway for dial on demand