From 95f3b4281c52df33489226eab4ffa6b23808f6b8 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Sun, 2 Sep 2001 23:39:22 +0000 Subject: - add ISDN patches from pekkas@netcore.fi and pb@bieringer.de (bug #52491) - fix handling of ISDN LSZ Compresssion --- ChangeLog | 7 ++++ initscripts.spec | 6 +++- sysconfig/network-scripts/ifdown-ippp | 8 +++++ sysconfig/network-scripts/ifup-ippp | 67 +++++++++++++++++++++++++---------- 4 files changed, 68 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index d14375f2..8ec9fa1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-09-03 Than Ngo + * ChangeLog, initscripts.spec: 6.35-1 + + * sysconfig/network-scripts/ifdown-ippp, sysconfig/network-scripts/ifup-ippp + add ISDN patches from pekkas@netcore.fi and pb@bieringer.de (bug #52491) + fix handling of ISDN LSZ Compresssion + 2001-08-30 Than Ngo * ChangeLog, initscripts.spec: 6.34-1 po/de.po: fix typo bug, lo instead 1o diff --git a/initscripts.spec b/initscripts.spec index 02a26d9b..5985dba4 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -1,6 +1,6 @@ Summary: The inittab file and the /etc/init.d scripts. Name: initscripts -Version: 6.34 +Version: 6.35 License: GPL Group: System Environment/Base Release: 1 @@ -239,6 +239,10 @@ rm -rf $RPM_BUILD_ROOT %dir /etc/locale/*/LC_MESSAGES %changelog +* Sun Sep 2 2001 Than Ngo +- add ISDN patches from pekkas@netcore.fi and pb@bieringer.de (bug #52491) +- fix handling of ISDN LSZ Compresssion + * Thu Aug 30 2001 Than Ngo - po/de.po: fix typo bug, lo instead 1o diff --git a/sysconfig/network-scripts/ifdown-ippp b/sysconfig/network-scripts/ifdown-ippp index 903d77dc..4a4c449d 100755 --- a/sysconfig/network-scripts/ifdown-ippp +++ b/sysconfig/network-scripts/ifdown-ippp @@ -2,6 +2,9 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin +# Get global network configuration +[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network + CONFIG=$1 . $CONFIG @@ -12,6 +15,11 @@ if [ -f /var/lock/subsys/ibod ] ; then rm -f /var/lock/subsys/ibod fi +# Shut down IPv6 +#if [ "${NETWORKING_IPV6}" = "yes" ]; then +# /etc/sysconfig/network-scripts/ifdown-ipv6 $DEVICE +#fi + # shutdown isdn device isdnctrl hangup $DEVICE >/dev/null 2>&1 sleep 1 diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp index 5b15f303..3fc9477b 100755 --- a/sysconfig/network-scripts/ifup-ippp +++ b/sysconfig/network-scripts/ifup-ippp @@ -10,7 +10,11 @@ cd /etc/sysconfig/network-scripts . network-functions . /etc/rc.d/init.d/functions +# Get global network configuration +[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network + DEBUG="no" +GATEWAY="" # set device CONFIG=$1 @@ -82,9 +86,6 @@ function start_ibod() function addprovider() { options= - if [ -z "$MSN" ]; then - log_echo "Error: $1: MSN not set" - fi if [ -z "$PHONE_OUT" ]; then log_echo "Error: $1: no outgoing phone number set" return 1 @@ -171,7 +172,7 @@ function addprovider() [ -n "$DIALMAX" ] && log_isdnctrl dialmax $DEVICE $DIALMAX # set callback - if [ "$CALLBACK" = "out" ]; then + if [ "$CALLBACK" = "out" -o "$CALLBACK" = "in" ] ; then log_isdnctrl callback $DEVICE $CALLBACK else log_isdnctrl callback $DEVICE off @@ -192,6 +193,10 @@ function addprovider() # set channel bundling if [ "$BUNDLING" = "yes" -o "$BUNDLING" = "on" ] && [ -n "$SLAVE_DEVICE" ]; then [ -z "$SLAVE_MSN" ] && SLAVE_MSN="$MSN" + if [ -z "$SLAVE_MSN" ]; then + log_echo "Error: $1: SLAVE_MSN not set" + exit 1 + fi [ -z "$SLAVE_PHONE_OUT" ] && SLAVE_PHONE_OUT="$PHONE_OUT" [ -z "$SLAVE_PHONE_IN" ] && SLAVE_PHONE_IN="$PHONE_IN" [ -z "$SLAVE_HUPTIMEOUT" ] && SLAVE_HUPTIMEOUT="$HUPTIMEOUT" @@ -257,17 +262,29 @@ function addprovider() # Add default route while connection options="$options defaultroute" - # configure Van Jacobson style TCP/IP header compression and + # Van Jacobson style TCP/IP header compression and # VJ connection-ID compression [ "$VJ" = "off" ] && options="$options -vj" [ "$VJCCOMP" = "off" ] && options="$options -vjccomp" - - # configure Address/Control compression, protocol field compression and - # BSD-Compression scheme + + # Address/Control compression, protocol field compression, [ "$AC" = "off" ] && options="$options -ac" [ "$PC" = "off" ] && options="$options -pc" - [ "$BSDCOMP" = "off" ] && options="$options -bsdcomp" - + + # BSD-Compression scheme + if [ "$BSDCOMP" = "on" ] ; then + options="$options bsdcomp 9,9" + else + options="$options -bsdcomp" + fi + # Stac compression + if [ "$LZS" = "on" ] ; then + # supports LZS check mode 3 and 4 + [ -n "$LZS_MODE" ] || LZS_MODE="4" + [ "$LZS_MODE" = "3" ] && options="$options lzs 1" + [ "$LZS_MODE" = "4" ] && options="$options lzs 1:4" + fi + # Set max receive and max transmit units [ -n "$MRU" ] && options="$options mru $MRU" [ -n "$MTU" ] && options="$options mtu $MTU" @@ -279,7 +296,7 @@ function addprovider() [ "$CCP" = "off" ] && options="$options noccp" # set host name - [ -n "$ISDN_HOSTNAME" ] && options="$options hostname $ISDN_HOSTNAME" + [ -n "$ISDN_HOSTNAME" ] && options="$options remotename $ISDN_HOSTNAME" # Set authentication for i in $AUTH ; do @@ -301,27 +318,39 @@ function addprovider() # set debug [ "$DEBUG" = "yes" ] && options="-d $options" + # set netmask, if available + [ -n "$NETMASK" ] && netmask="netmask $NETMASK" + # activate ISDN device - ifconfig $DEVICE $IPADDR pointopoint $GATEWAY up >/dev/null 2>&1 + logger -p daemon.info -t ifup-ippp "ifconfig $DEVICE $IPADDR pointopoint $GATEWAY $netmask up" + ifconfig $DEVICE $IPADDR pointopoint $GATEWAY $netmask up >/dev/null 2>&1 if [ "$ENCAP" = "syncppp" ]; then # start ipppd daemon - ipppd $options + logger -p daemon.info -t ifup-ippp "ipppd $options" + ipppd $options >/dev/null 2>&1 # start ibod daemon [ "$BUNDLING" = "yes" -o "$BUNDLING" = "on" ] && [ -n "$SLAVE_DEVICE" ] && start_ibod $DEVICE fi # set default gateway for dial on demand - if [ "$DIALMODE" = "auto" ]; then + if [ "$DIALMODE" = "auto" ] ; then echo 1 > /proc/sys/net/ipv4/ip_dynaddr - route del default >/dev/null 2>&1 - if [ "$GATEWAY" = "10.112.112.113" ]; then - route add default $DEVICE >/dev/null 2>&1 - else - route add default gw $GATEWAY >/dev/null 2>&1 + if [ "$DEFROUTE" = "yes" ] ; then + route del default >/dev/null 2>&1 + if [ "$GATEWAY" = "10.112.112.113" ]; then + route add default $DEVICE >/dev/null 2>&1 + else + route add default gw $GATEWAY >/dev/null 2>&1 + fi fi fi + + ## Setup IPv6 + #if [ "${NETWORKING_IPV6}" = "yes" ]; then + # /etc/sysconfig/network-scripts/ifup-ipv6 $DEVICE + #fi } addprovider || exit 1 -- cgit v1.2.1