commit c3a2f2d81e6b588d1573c533dd9ac21e60673460 Author: kueller Date: Sat May 3 16:58:50 2008 +0000 V961 Tree Umbau git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_isdn4k-utils@4269 504e572c-2e33-0410-9681-be2bf7408885 diff --git a/etc/init.d/isdn b/etc/init.d/isdn new file mode 100644 index 0000000..0dfc56f --- /dev/null +++ b/etc/init.d/isdn @@ -0,0 +1,127 @@ +#!/bin/bash +#Start/Stop Script für ISDN-Netzwerk Devices +#(c) Rainmaker MultiMedia OHG +# +#$Author$ +#$Date$ +#$Revision$ +# +#$Log$ +#Revision 1.6 2004/02/20 14:42:11 kueller +#Einstellungen und Setup fuer Kanalbuendelung hinzugefuegt. Start fuer ibod +#muss noch eingebaut werden, wenn das binary fuer ibod existiert +# +#Revision 1.5 2003/04/19 08:10:37 kueller +#Restart Option eingebaut +# +#Revision 1.4 2002/11/04 22:40:43 kueller +#Wenn keine ISDN - Geräte konfiguriert sind, wird dies nun zuverlässiger erkannt, +#und keine Fehlermeldung mehr erzeugt. Dazu war das Nachbearbeiten der Variable +#DEVNUM mit sed notwendig. "wc" hinterlässt leerzeichen in der Variable. +# +#Revision 1.3 2002/05/14 09:16:59 hkueller +#ippp# wird nun mit der adresse 1.1.1.1 initialisiert. 0.0.0.0 wäre zwar richtig, +#jedoch wird so das interface bei der netzwerkinitialisierung mit +# ip -f inet addr list +#nicht erkannt - was zu fehlern bei der initialisierung des Routings führt +#(u.U. nicht eingeschaltenes (/proc/sys/net/ipv4/ip_forward). +# +#Revision 1.2 2001/09/28 22:59:41 kueller +#ipppd wird nun nur beendet, wenn ippp Interfaces configuriert sind. +# +#Revision 1.1.1.1 2001/09/23 00:21:27 kueller +#Neustart wg. Datenverlust +# +#Revision 1.1.1.1 2001/08/29 20:55:09 cro +#Erstes einspielen der Dateien +# +# + + +source /etc/init.d/functions + +DEVNUM=`ls /etc/sysconfig/net/isdn.* 2>/dev/null|wc -w` + +DEVNUM=`echo "$DEVNUM"|sed -e "s/ *//"` + +case $1 in + start) + if [ ! "$DEVNUM" = "0" ]; then + for i in `ls /etc/sysconfig/net/isdn.*|cut -d "." -f2`; do + echo -n "Setting up isdn Interface $i" + source /etc/sysconfig/net/isdn.$i + isdnctrl addif $i >/dev/null + isdnctrl addphone $i out $OUTPHONE >/dev/null + isdnctrl eaz $i $EAZ >/dev/null + isdnctrl huptimeout $i $HANGUP >/dev/null + isdnctrl dialmax $i $DIALMAX >/dev/null + isdnctrl chargehup $i $CHARGEHUP >/dev/null + isdnctrl l2_prot $i hdlc >/dev/null + isdnctrl dialmode $i $DIALMODE >/dev/null + if [ "$CHANNELB" ]; then + isdnctrl addslave $CHANNELB >/dev/null + isdnctrl sdelay $CHANNELB 0 >/dev/null + isdnctrl trigger $CHANNELB 4096 >/dev/null + isdnctrl addphone $CHANNELB out $OUTPHONE >/dev/null + isdnctrl eaz $CHANNELB $EAZ >/dev/null + isdnctrl huptimeout $CHANNELB $HANGUP >/dev/null + isdnctrl dialmax $CHANNELB $DIALMAX >/dev/null + isdnctrl chargehup $CHANNELB $CHARGEHUP >/dev/null + isdnctrl l2_prot $CHANNELB hdlc >/dev/null + isdnctrl dialmode $CHANNELB $DIALMODE >/dev/null + fi + case $i in + ippp?) + isdnctrl encap $i syncppp >/dev/null + if [ "$CHANNELB" ]; then + isdnctrl encap $CHANNELB syncppp >/dev/null + fi + ipppd /dev/$i file /etc/ppp/options.$i + if [ $DEFAULT == 1 ]; then + ifconfig ippp0 1.1.1.1 + route add default dev ippp0 + fi + ;; + isdn?) + isdnctrl addphone $i in $INPHONE >/dev/null + isdnctrl chargeint $i $CHARGEINT >/dev/null + isdnctrl callback $i $CALLBACK >/dev/null + isdnctrl cbdelay $i $CBDELAY >/dev/null + isdnctrl cbhup $i $CBHUP >/dev/null + isdnctrl secure $i $SECURE >/dev/null + isdnctrl encap $i rawip >/dev/null + ;; + *) + logger -p daemon.notice -t isdn "Unknown Device name $i" + ;; + esac + evaluate_retval + done + fi + ;; + stop) + route del default + IPPD=1 + for i in `ls /etc/sysconfig/net/isdn.*|cut -d "." -f2`; do + case $i in + ippp?) + if [ $IPPD == "1" ]; then + echo -n "Stopping ipppd Daemons" + killproc /sbin/ipppd + IPPD=0 + fi + ;; + esac + echo -n "Deleting isdn Interface $i" + isdnctrl delif $i force >/dev/null + evaluate_retval + done + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" +esac diff --git a/etc/ppp/ip-up b/etc/ppp/ip-up new file mode 100644 index 0000000..d210690 --- /dev/null +++ b/etc/ppp/ip-up @@ -0,0 +1,39 @@ +#!/bin/sh +#Netwerk Konfigurationen nach Upschaltung von isdn Devices (PPP) erledigen +#(c) Rainmaker MultiMedia OHG +# +#$Author$ +#$Date$ +#$Revision$ +# +#$Log$ +#Revision 1.1 2001/09/23 00:21:27 kueller +#Initial revision +# +#Revision 1.1.1.1 2001/08/29 20:55:09 cro +#Erstes einspielen der Dateien +# +# + + +BASENAME=`basename $0` +INTERFACE=$1 +DEVICE=$2 +SPEED=$3 +LOCALIP=$4 +REMOTEIP=$5 + +case "$BASENAME" in +ip-up) + /sbin/route del default + /sbin/route add default dev ippp0 + /usr/bin/touch /var/log/subsys/ip-up + ;; +ip-down) + /sbin/route del default + /sbin/route add default dev ippp0 + /usr/bin/rm /var/log/subsys/ip-up + ;; +*) + ;; +esac diff --git a/etc/ppp/options.ippp0 b/etc/ppp/options.ippp0 new file mode 100644 index 0000000..542dcd0 --- /dev/null +++ b/etc/ppp/options.ippp0 @@ -0,0 +1,69 @@ +# /etc/ppp/options.ippp? +# +# for isdn4linux/syncPPP and dynamic IP-numbers +# +# +# Klaus Franken, kfr@suse.de +# Version: 27.08.97 (5.1) +# +# This file is copy by YaST from /etc/ppp/ioptions.YaST +# to options. + +debug + +# The device(s) +# for more than one device try: +# /dev/ippp0 /dev/ippp1 ... +/dev/ippp0 + +# The IP addresses: : +# just "0.0.0.0:" or nothing for dynamic IP +0.0.0.0: + +# my user name +user + +# my system name (only for CHAP!) +# name my_system_name + +# accept IP addresses from peer +# use with dynamic IP +ipcp-accept-local +ipcp-accept-remote +noipdefault + +# try to get IP address from interface +# option specific to ipppd (as opposed to pppd) +# use only with static IP +#useifip + +# disable all header-compression +-vj +-vjccomp +-ac +-pc +-bsdcomp + +# sometimes you need this: +#noccp + +# max receive unit +mru 1524 +# max transmit unit +mtu 1500 + +# If this machine is a server, force authentication by uncommenting one +# of the following. However, if this machine is a client, doing this will +# prevent a succesful connection! (message "peer refused to authenticate"). +# So, only uncomment on a server. +# "+pap" / "+chap" NUR AKTIVIEREN, WENN DIES EIN SERVER IST!!! +#+pap +#+chap + +# if you have problems with handshaking (no response for first +# lcp-package) try to decrease the retry-cycle. Default is 3 sec, +# try for example 2 sec: +# lcp-restart 2 + +# if you want to use Channel Boundling with mppp - activate this entry! +#+mp diff --git a/etc/ppp/pap-secrets b/etc/ppp/pap-secrets new file mode 100644 index 0000000..d4ce36e --- /dev/null +++ b/etc/ppp/pap-secrets @@ -0,0 +1 @@ + * diff --git a/etc/sysconfig/templates/isdn.ippp0 b/etc/sysconfig/templates/isdn.ippp0 new file mode 100644 index 0000000..c2e1c0d --- /dev/null +++ b/etc/sysconfig/templates/isdn.ippp0 @@ -0,0 +1,30 @@ + +#!/bin/bash +#Template Konfiguration für isdn PPP Devices +#(c) Rainmaker MultiMedia OHG +# +#$Author$ +#$Date$ +#$Revision$ +# +#$Log$ +#Revision 1.2 2004/02/20 14:42:11 kueller +#Einstellungen und Setup fuer Kanalbuendelung hinzugefuegt. Start fuer ibod +#muss noch eingebaut werden, wenn das binary fuer ibod existiert +# +#Revision 1.1.1.1 2001/09/23 00:21:27 kueller +#Neustart wg. Datenverlust +# +#Revision 1.1.1.1 2001/08/29 20:55:09 cro +#Erstes einspielen der Dateien +# +# + +OUTPHONE= +EAZ= +HANGUP=0 +DIALMAX=10 +CHARGEHUP=off +DIALMODE=auto +DEFAULT=1 +#CHANNELB= diff --git a/etc/sysconfig/templates/isdn.isdn0 b/etc/sysconfig/templates/isdn.isdn0 new file mode 100644 index 0000000..7772061 --- /dev/null +++ b/etc/sysconfig/templates/isdn.isdn0 @@ -0,0 +1,30 @@ + +#!/bin/bash +#Template Datei für RAW ISDN Konfiguration +#(c) Rainmaker MultiMedia OHG +# +#$Author$ +#$Date$ +#$Revision$ +# +#$Log$ +#Revision 1.1 2001/09/23 00:21:27 kueller +#Initial revision +# +#Revision 1.1.1.1 2001/08/29 20:55:09 cro +#Erstes einspielen der Dateien +# +# + +OUTPHONE= +INPHONE= +EAZ= +HANGUP=85 +DIALMAX=5 +CHARGEHUP=on +CHARGEINT=85 +CALLBACK=out +CBDELAY=1 +CBHUP=off +SECURE=on +DIALMODE=auto diff --git a/init/genpkg b/init/genpkg new file mode 100644 index 0000000..d70ac12 --- /dev/null +++ b/init/genpkg @@ -0,0 +1,33 @@ +#!/bin/bash +#Automatische Generierung von glibc +#Script Framework - Automatisiertes Erzeugen der Monsum Linux Distribution +#(c) Rainmaker MultiMedia OHG +# +#$Author$ +#$Date$ +#$Revision$ +# +#$Log$ +#Revision 1.2 2001/10/17 08:26:06 kueller +#Rechtekorrektur für init script +# +#Revision 1.1.1.1 2001/09/23 00:21:27 kueller +#Neustart wg. Datenverlust +# +# + +WDIR=`pwd` +cd etc/init.d +chmod 755 isdn +mkdir rc{0,1,2,3,4,5,6}.d +for i in 0 1 6; do + cd rc$i.d + ln -s ../isdn K86isdn + cd .. +done +for i in 2 3 4 5; do + cd rc$i.d + ln -s ../isdn S06isdn + cd .. +done +cd $WDIR