Re: ISDN help
Hi,
On 19 Oct 2000, Rodolfo Sikora de Melo wrote:
> I need help to config my ISDN card...
> I've already instaled it, but I can't connect anywhere.
> Could somebody send me init.d.funcions and help me how to dial up?
This is my one (/etc/init.d/isdn)
--<snip>--
#! /bin/sh
#
# Start the isdn Subsystem and i4l
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="isdn subsystem and ipppd"
set -e
## i4l Parameter
MSN=2623689
DIALMODE="auto"
## NGI
# OUT="0103319106440"
## Germany Net
## T-Online
OUT="0191011"
TIMEOUT=300
DIALMAX=9999
## ipppd Pidfile
PIDFILE="/var/lock/ippp0.pid"
case "$1" in
start)
echo -n "Starting $DESC: "
## Let's look if ipppd is already started
if test -f $PIDFILE; then
echo "It seems like there's another ipppd running.\n"
echo "I'll shut it down first"
kill -9 `cat $PIDFILE`
fi
## Now configure the isdn device
/usr/sbin/isdnctrl addif ippp0
/usr/sbin/isdnctrl eaz ippp0 $MSN
/usr/sbin/isdnctrl dialmode ippp0 $DIALMODE
## add the dialout Numbers
for FON in $OUT; do
/usr/sbin/isdnctrl addphone ippp0 out $FON
echo added dialout $FON to ippp0
done
/usr/sbin/isdnctrl l2_prot ippp0 hdlc
/usr/sbin/isdnctrl l3_prot ippp0 trans
/usr/sbin/isdnctrl encap ippp0 syncppp
/usr/sbin/isdnctrl secure ippp0 on
/usr/sbin/isdnctrl huptimeout ippp0 $TIMEOUT
/usr/sbin/isdnctrl ihup ippp0 on
/usr/sbin/isdnctrl dialmax ippp0 $DIALMAX
## Let's add the interface and route all unrouted packages
## through ippp0
/sbin/ifconfig ippp0 192.168.0.99
/sbin/ifconfig ippp0 pointopoint 192.168.0.98
/sbin/route add default gw 192.168.0.98 dev ippp0
## Let's start isdnlog
/usr/sbin/hisaxctrl HiSax 1 4
/usr/sbin/isdnlog -f/etc/isdn/isdnlog.isdnctrl0 /dev/isdnctrl0
## Now start ipppd
/usr/sbin/ipppd pidfile $PIDFILE file /etc/ppp/options.ippp0
;;
stop)
echo -n "Stopping $DESC: "
/sbin/ifconfig ippp0 down
/usr/sbin/isdnctrl delif ippp0
kill `cat $PIDFILE`
STR=`ps -C isdnlog`
if test "$STR";then
killall isdnlog
fi
;;
restart)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC: "
$0 stop && $0 start
;;
*)
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $0 {start|stop|restart}" >&2
exit 1
;;
esac
exit 0
--<snap>--
Ciao,
Timo<t_benk@gmx.de>
--
.-'~~~-.
.'o oOOOo`. | Timo Benk
;~~~-.oOo o`. | Germany
`. \ ~-. oOOo. | Fax/Voicemail: +49891488214215
`.; / ~. OO: |
.' ;-- `.o.' |
,' ; ~~--'~ | [ASCII stolen from Mescalito Ted]
; ; |
_\\;_\\//_
Reply to:
- References:
- ISDN help
- From: "Rodolfo Sikora de Melo" <vo0do0@trevas.net>