summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2005-03-29 06:43:28 +0000
committerAlin Năstac <mrness@gentoo.org>2005-03-29 06:43:28 +0000
commitcbe3a144c4f1bb6c009980ead93a9f9c5e649f5e (patch)
tree47178caa14691055edfb46e853e7e71fc7bc857f /net-dialup/capi4k-utils/files
parentThanks Mr_Bones_! (diff)
downloadhistorical-cbe3a144c4f1bb6c009980ead93a9f9c5e649f5e.tar.gz
historical-cbe3a144c4f1bb6c009980ead93a9f9c5e649f5e.tar.bz2
historical-cbe3a144c4f1bb6c009980ead93a9f9c5e649f5e.zip
version bump
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-dialup/capi4k-utils/files')
-rw-r--r--net-dialup/capi4k-utils/files/20041006/capi.init45
-rw-r--r--net-dialup/capi4k-utils/files/README.gentoo48
-rw-r--r--net-dialup/capi4k-utils/files/capi.blacklist24
-rw-r--r--net-dialup/capi4k-utils/files/capi.confd11
-rw-r--r--net-dialup/capi4k-utils/files/capi.hotplug95
-rw-r--r--net-dialup/capi4k-utils/files/capi.initd59
-rw-r--r--net-dialup/capi4k-utils/files/capi.usermap8
-rw-r--r--net-dialup/capi4k-utils/files/config8
-rw-r--r--net-dialup/capi4k-utils/files/digest-capi4k-utils-200503221
-rw-r--r--net-dialup/capi4k-utils/files/rcapid.xinetd13
10 files changed, 267 insertions, 45 deletions
diff --git a/net-dialup/capi4k-utils/files/20041006/capi.init b/net-dialup/capi4k-utils/files/20041006/capi.init
deleted file mode 100644
index b5a98bf13d77..000000000000
--- a/net-dialup/capi4k-utils/files/20041006/capi.init
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/20041006/capi.init,v 1.1 2004/11/13 10:29:19 mrness Exp $
-
-opts="start stop info show"
-
-depend() {
- after isapnp
-}
-
-start() {
- if [ ! -e /etc/capi.conf ] ; then
- eerror "You're missing /etc/capi.conf (comes with a capi-driver)."
- eerror "Emerge net-dialup/fcpci if you are having an AVM Fritz!Card PCI"
- return 1
- fi
-
- ebegin "Loading CAPI"
-
- if /usr/sbin/capiinit start ; then
- /usr/sbin/capiinit status | while read INFO; do
- einfo " $INFO"
- done
- fi
-
- eend $?
-}
-
-stop() {
- ebegin "Unloading CAPI"
-
- /usr/sbin/capiinit stop 2>/dev/null
-
- eend $?
-}
-
-info() {
- /usr/sbin/capiinit status
-}
-
-show() {
- /usr/sbin/capiinit show
-}
-
diff --git a/net-dialup/capi4k-utils/files/README.gentoo b/net-dialup/capi4k-utils/files/README.gentoo
new file mode 100644
index 000000000000..ea1e3a985ca3
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/README.gentoo
@@ -0,0 +1,48 @@
+####################################################################
+# CAPI4Linux / Gentoo usage instructions #
+####################################################################
+
+First edit /etc/capi.conf to match your configuration.
+
+here an example for the AVM B1 PCI card:
+
+ # card file proto io irq mem cardnr options
+ b1pci b1.t4 DSS1 - - - -
+
+First option is the name of the kernel driver, second is the firmware
+file which will be uploaded to the card. All firmware files for the
+active AVM controllers can be found in /lib/firmware which is the
+location where all firmware files have to be placed.
+
+The 'cardnr' option can be left '-' if you only have one card.
+Otherwise fill in the card number you want to assign to this card.
+
+Now you can start the CAPI with
+
+ /etc/init.d/capi start
+
+It should show the loaded drivers/cards after the initialization.
+You can check the CAPI with the 'capiinfo' command.
+
+So, if all runs smoothly, then fixate it
+
+ rc-update add capi boot
+
+You can now install the package net-dialup/isdn4k-utils if you
+want to use all the legacy ISDN apps, such as 'isdnlog'.
+
+
+pppdcapiplugin
+~~~~~~~~~~~~~~
+please read the README and have a look at the examples.
+
+
+rcapid
+~~~~~~
+if you want to use 'rcapid' (remote capi daemon), then install
+sys-apps/xinetd and configure it in /etc/xinetd.d/rcapid
+and read the rcapid documentation.
+
+
+--
+Stefan Briesenick <sbriesen@gmx.de> 2004-12-20
diff --git a/net-dialup/capi4k-utils/files/capi.blacklist b/net-dialup/capi4k-utils/files/capi.blacklist
new file mode 100644
index 000000000000..7ef81d727149
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.blacklist
@@ -0,0 +1,24 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi.blacklist,v 1.1 2005/03/29 06:43:28 mrness Exp $
+
+# CAPI USB is handled via /etc/hotplug/usb/capi.usermap
+fcusb
+fcusb2
+fxusb
+fxusb_CZ
+fcdslusb
+bfusb
+
+# CAPI modules are load from /etc/init.d/capi
+b1isa
+b1pci
+b1pcmcia
+c4
+t1isa
+t1pci
+fcpci
+fcclassic
+fcdsl
+fcdsl2
+fcdslsl
diff --git a/net-dialup/capi4k-utils/files/capi.confd b/net-dialup/capi4k-utils/files/capi.confd
new file mode 100644
index 000000000000..73d5f9942513
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.confd
@@ -0,0 +1,11 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi.confd,v 1.1 2005/03/29 06:43:28 mrness Exp $
+
+# do you want to use USB hotplug?
+# if disabled, you have to configure your device in /etc/capi.conf
+CAPI_HOTPLUG_USB=1
+
+# should via hotplug added cards generate a beep?
+CAPI_HOTPLUG_BEEP=1
+
diff --git a/net-dialup/capi4k-utils/files/capi.hotplug b/net-dialup/capi4k-utils/files/capi.hotplug
new file mode 100644
index 000000000000..9ed7517069ff
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.hotplug
@@ -0,0 +1,95 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi.hotplug,v 1.1 2005/03/29 06:43:28 mrness Exp $
+
+. /etc/conf.d/capi
+
+[ "$CAPI_HOTPLUG_USB" = "0" ] && exit 0
+
+# driver lookup
+cardinfo() { # <driver>
+ /bin/sed 2>/dev/null -n "s:^\([1-9][0-9]*\) \+${1} \+\([^ ]\+\) \+\([^ ]\+\).*:\1 \3 \2:p" /proc/capi/controller
+}
+
+# AVM firmware loader
+avmusb() { # <card> <firmware>
+ /usr/sbin/avmcapictrl load "/lib/firmware/${2}" "${1}"
+}
+
+# normalize and split product code
+# only needed, because coldplug gives other results than hotplug :-/
+IFS="/" read _A _B _C < <(echo "${PRODUCT}")
+read VENDOR DEVID PCLASS < <(/usr/bin/printf "%04x %04x %04x" "0x${_A}" "0x${_B}" "0x${_C}")
+VENDID="${VENDOR}/${DEVID}"
+DEVTMP="${DEVICE##/proc/bus/usb/}"
+USBBUS="${DEVTMP%%/*}"
+USBDEV="${DEVTMP##*/}"
+
+LOCK="/tmp/.capi-usb-${USBBUS}-${USBDEV}"
+LOADER=""
+DRIVER=""
+FIRMWARE=""
+
+# select driver and firmware
+case "${VENDID}" in
+ "057c/0c00") # FRITZCARD!USB
+ DRIVER="fcusb"
+ ;;
+ "057c/1000") # FRITZCARD!USB v2.0
+ LOADER="avmusb"
+ DRIVER="fcusb2"
+ FIRMWARE="fus2base.frm"
+ ;;
+ "057c/1900") # FRITZCARD!USB v2.1
+ LOADER="avmusb"
+ DRIVER="fcusb2"
+ FIRMWARE="fus3base.frm"
+ ;;
+ "057c/2000") # FRITZX!USB
+ DRIVER="fxusb"
+ ;;
+ "057c/2200") # BlueFRITZ!USB
+ DRIVER="bfusb"
+ ;;
+ "057c/2300") # FRITZDSL!USB
+ LOADER="avmusb"
+ DRIVER="fcdslusb"
+ FIRMWARE="fdsubase.frm"
+ ;;
+ "057c/2800") # FRITZX!USB OEM
+ DRIVER="fxusb_CZ"
+ ;;
+ "057c/3500") # FRITZDSL!USB SL
+ LOADER="avmusb"
+ DRIVER="fcdslslusb"
+ FIRMWARE="fdlubase.frm"
+ ;;
+ *) # unknown card
+ echo "unknown USB product: $VENDID"
+ exit 1
+esac
+
+case "$ACTION" in
+ add)
+ /bin/ln 2>/dev/null -s "$$" "$LOCK" || exit 0
+ for MODULE in kernelcapi capi capidrv $DRIVER; do
+ /sbin/modprobe -s $MODULE || exit 1
+ done
+ if [ -n "$LOADER" -a -n "$FIRMWARE" ]; then
+ CNT=0 # wait for udev
+ while [ ! -e /dev/capi20 -a $CNT -lt 10 ]; do
+ sleep 1; : $((CNT++))
+ done
+ read CARD NAME STATUS < <(cardinfo $DRIVER)
+ [ "$STATUS" = "detected" ] && $LOADER $CARD $FIRMWARE
+ fi
+ [ "$CAPI_HOTPLUG_BEEP" = "0" ] || echo -en "\033[10;1200]\a\033[10;262]" > /dev/console
+ /bin/rm -f "$LOCK"
+ ;;
+ remove)
+ /sbin/modprobe -sqr $DRIVER
+ [ "$CAPI_HOTPLUG_BEEP" = "0" ] || echo -en "\033[10;300]\a\033[10;262]" > /dev/console
+ ;;
+esac
+exit 0
diff --git a/net-dialup/capi4k-utils/files/capi.initd b/net-dialup/capi4k-utils/files/capi.initd
new file mode 100644
index 000000000000..d263703760b8
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.initd
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi.initd,v 1.1 2005/03/29 06:43:28 mrness Exp $
+
+opts="start stop info"
+
+depend() {
+ after coldplug isapnp
+}
+
+get_modules() {
+ /usr/bin/cut 2>/dev/null -f2 -d' ' /proc/capi/controller
+}
+
+start() {
+ if [ ! -e /etc/capi.conf ] ; then
+ eerror "You're missing /etc/capi.conf (comes with a capi-driver)."
+ eerror "Emerge net-dialup/fcpci if you are having an AVM Fritz!Card PCI"
+ return 1
+ fi
+
+ ebegin "Loading CAPI"
+ ( [ -f /proc/capi/capi20 ] || /sbin/modprobe capi ) && \
+ ( [ -f /proc/capi/capidrv ] || /sbin/modprobe capidrv )
+ eend $? || return 1
+
+ CNT=0 # wait for udev
+ while [ ! -e /dev/capi20 -a $CNT -lt 10 ]; do
+ sleep 1; : $((CNT++))
+ done
+
+ if /usr/sbin/capiinit activate ; then
+ while read INFO; do einfo " $INFO"; done < /proc/capi/controller
+ fi
+
+ eend $?
+}
+
+stop() {
+ local DRIVERS=$(get_modules)
+
+ ebegin "Unloading CAPI"
+
+ /sbin/modprobe -sqr capidrv
+ /usr/sbin/capiinit 2>/dev/null stop
+ for DRV in $DRIVERS; do /sbin/modprobe -sqr $DRV; done
+
+ eend 0
+}
+
+info() {
+ if [ -e /proc/capi/controller ]; then
+ while read INFO; do einfo "$INFO"; done < /proc/capi/controller
+ else
+ eerror "ERROR: CAPI not loaded"
+ return 1
+ fi
+}
diff --git a/net-dialup/capi4k-utils/files/capi.usermap b/net-dialup/capi4k-utils/files/capi.usermap
new file mode 100644
index 000000000000..0285836dd726
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.usermap
@@ -0,0 +1,8 @@
+capi 0x0003 0x057c 0x0c00 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x1000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x1900 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2200 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2300 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2800 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x3500 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
diff --git a/net-dialup/capi4k-utils/files/config b/net-dialup/capi4k-utils/files/config
new file mode 100644
index 000000000000..970991b22951
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/config
@@ -0,0 +1,8 @@
+CONFIG_KERNELDIR='/usr/src/linux'
+CONFIG_BINDIR='/usr/bin'
+CONFIG_SBINDIR='/usr/sbin'
+CONFIG_MANDIR='/usr/share/man'
+CONFIG_AVMCAPICTRL=y
+CONFIG_CAPIFAX=y
+CONFIG_RCAPID=y
+CONFIG_PPPDCAPIPLUGIN=y
diff --git a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20050322 b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20050322
new file mode 100644
index 000000000000..2bd55066b133
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20050322
@@ -0,0 +1 @@
+MD5 99fff14616c981ec0d0cf67c1a4ac772 capi4k-utils-2005-03-22.tar.gz 679621
diff --git a/net-dialup/capi4k-utils/files/rcapid.xinetd b/net-dialup/capi4k-utils/files/rcapid.xinetd
new file mode 100644
index 000000000000..01208331873f
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/rcapid.xinetd
@@ -0,0 +1,13 @@
+service rcapid
+{
+ port = 2662
+ socket_type = stream
+ wait = no
+ user = root
+ type = unlisted
+ server = /usr/sbin/rcapid
+ server_args = -l 5
+ log_on_success += USERID
+ log_on_failure += USERID
+ disable = yes
+}