From 93e74614c9521f3a05c1ce8de7ebfbe4527da63c Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Tue, 21 Aug 2001 12:41:40 +0000 Subject: - fix shutdown/Bringing up isdn device --- sysconfig/network-scripts/ifdown-ippp | 2 ++ sysconfig/network-scripts/ifup-ippp | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/ifdown-ippp b/sysconfig/network-scripts/ifdown-ippp index f124a867..903d77dc 100755 --- a/sysconfig/network-scripts/ifdown-ippp +++ b/sysconfig/network-scripts/ifdown-ippp @@ -13,6 +13,8 @@ if [ -f /var/lock/subsys/ibod ] ; then fi # shutdown isdn device +isdnctrl hangup $DEVICE >/dev/null 2>&1 +sleep 1 ifconfig $DEVICE down >/dev/null 2>&1 # delete isdn device diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp index 8ab1680f..04deb54f 100755 --- a/sysconfig/network-scripts/ifup-ippp +++ b/sysconfig/network-scripts/ifup-ippp @@ -28,10 +28,12 @@ if [ ! -x /usr/sbin/isdnctrl -a ! -x /sbin/isdnctrl ] ; then exit 1 fi -# load provider config -#[ -f /etc/sysconfig/networking/devices/$DEVICE.d/dialup ] || exit 1 -#. /etc/sysconfig/networking/devices/$DEVICE.d/dialup - +# check all ISDN devices +if ! isdnctrl list all >/dev/null 2>&1 ; then + logger -p daemon.info -t ifup-ippp "cannot list ISDN devices" + exit 1 +fi + # check if device already is configured isdnctrl list $DEVICE >/dev/null 2>&1 && exit 0 @@ -311,6 +313,10 @@ function addprovider() fi } +if [ ! -f /var/lock/subsys/isdn -a -x /etc/rc.d/init.d/isdn ] ; then + /etc/rc.d/init.d/isdn start +fi + addprovider || exit 1 /etc/sysconfig/network-scripts/ifup-post $CONFIG -- cgit v1.2.1