Neue Version V963
git-svn-id: svn://svn.compuextreme.de/Viitor/V963/Viitor_isdn4k-utils@5933 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
commit
ae3f8efd08
127
etc/init.d/isdn
Normal file
127
etc/init.d/isdn
Normal file
@ -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
|
39
etc/ppp/ip-up
Normal file
39
etc/ppp/ip-up
Normal file
@ -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
|
69
etc/ppp/options.ippp0
Normal file
69
etc/ppp/options.ippp0
Normal file
@ -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.<device>
|
||||
|
||||
debug
|
||||
|
||||
# The device(s)
|
||||
# for more than one device try:
|
||||
# /dev/ippp0 /dev/ippp1 ...
|
||||
/dev/ippp0
|
||||
|
||||
# The IP addresses: <local>:<remote>
|
||||
# just "0.0.0.0:" or nothing for dynamic IP
|
||||
0.0.0.0:
|
||||
|
||||
# my user name
|
||||
user <put your UserName here>
|
||||
|
||||
# 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 <Put your Master Device here> <Put your slave device here>
|
1
etc/ppp/pap-secrets
Normal file
1
etc/ppp/pap-secrets
Normal file
@ -0,0 +1 @@
|
||||
<put your loginname here> * <put your password here>
|
30
etc/sysconfig/templates/isdn.ippp0
Normal file
30
etc/sysconfig/templates/isdn.ippp0
Normal file
@ -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=<Put outgoing number here>
|
||||
EAZ=<put your msn here>
|
||||
HANGUP=0
|
||||
DIALMAX=10
|
||||
CHARGEHUP=off
|
||||
DIALMODE=auto
|
||||
DEFAULT=1
|
||||
#CHANNELB=<Slave Device for Channel Boundling>
|
30
etc/sysconfig/templates/isdn.isdn0
Normal file
30
etc/sysconfig/templates/isdn.isdn0
Normal file
@ -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=<put outgoing number here>
|
||||
INPHONE=<put incomming number here>
|
||||
EAZ=<put your msn here>
|
||||
HANGUP=85
|
||||
DIALMAX=5
|
||||
CHARGEHUP=on
|
||||
CHARGEINT=85
|
||||
CALLBACK=out
|
||||
CBDELAY=1
|
||||
CBHUP=off
|
||||
SECURE=on
|
||||
DIALMODE=auto
|
33
init/genpkg
Normal file
33
init/genpkg
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user