diff options
author | Alin Năstac <mrness@gentoo.org> | 2004-12-23 22:12:34 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2004-12-23 22:12:34 +0000 |
commit | 86b8ce4267fd888d8705c28abcc759c85fc73cbe (patch) | |
tree | 356edfb6409831d03f1804fb20c50241f3b001fb /net-dialup/isdn4k-utils | |
parent | Moved from app-sci/bioperl-pipeline to sci-biology/bioperl-pipeline (diff) | |
download | historical-86b8ce4267fd888d8705c28abcc759c85fc73cbe.tar.gz historical-86b8ce4267fd888d8705c28abcc759c85fc73cbe.tar.bz2 historical-86b8ce4267fd888d8705c28abcc759c85fc73cbe.zip |
version bump & improved init scripts (#75117)
Diffstat (limited to 'net-dialup/isdn4k-utils')
20 files changed, 1063 insertions, 5 deletions
diff --git a/net-dialup/isdn4k-utils/ChangeLog b/net-dialup/isdn4k-utils/ChangeLog index 39770ac933f6..cf67a69535cb 100644 --- a/net-dialup/isdn4k-utils/ChangeLog +++ b/net-dialup/isdn4k-utils/ChangeLog @@ -1,6 +1,23 @@ # ChangeLog for net-dialup/isdn4k-utils # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/ChangeLog,v 1.34 2004/12/03 18:45:00 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/ChangeLog,v 1.35 2004/12/23 22:12:34 mrness Exp $ + +*isdn4k-utils-3.6_pre20041219 (24 Dec 2004) + + 24 Dec 2004; Alin Nastac <mrness@gentoo.org> + +files/3.6_pre20041219/auerswald.usermap, +files/3.6_pre20041219/config, + +files/3.6_pre20041219/hisax.conf, +files/3.6_pre20041219/hisax.initd, + +files/3.6_pre20041219/hisax.usermap, +files/3.6_pre20041219/ioptions, + +files/3.6_pre20041219/ip-down, +files/3.6_pre20041219/ip-up, + +files/3.6_pre20041219/isdn.blacklist, +files/3.6_pre20041219/isdn.confd, + +files/3.6_pre20041219/isdn.initd, +files/3.6_pre20041219/isdnlog.confd, + +files/3.6_pre20041219/isdnlog.initd, + +files/3.6_pre20041219/isdnlog.logrotated, + +files/3.6_pre20041219/net.ippp0, +files/3.6_pre20041219/options.ippp0, + +isdn4k-utils-3.6_pre20041219.ebuild: + Version bumped and insertion of several initialization scripts and + configuration files imported from bug #75117. Thanks goes to Stefan + Briesenick <sbriesen@gmx.de>. *isdn4k-utils-3.5_pre20041110-r3 (03 Dec 2004) diff --git a/net-dialup/isdn4k-utils/Manifest b/net-dialup/isdn4k-utils/Manifest index 42a2969e7e73..ea247da8a61f 100644 --- a/net-dialup/isdn4k-utils/Manifest +++ b/net-dialup/isdn4k-utils/Manifest @@ -1,13 +1,15 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 7cec83fd31c920b73fc4f50b66eaab89 ChangeLog 8122 +MD5 0ad0aa6529bec5777e88eb44369c41aa ChangeLog 9021 MD5 3e1f2a62b125bc976d086e9f6c596aa0 isdn4k-utils-3.2_p1-r2.ebuild 2932 MD5 bab835f739889e139f5acaf397d3d875 metadata.xml 215 MD5 4c3fa8046ef0b40f78a445858d682c8d isdn4k-utils-3.5_pre20041110-r3.ebuild 6742 +MD5 ca14583155c39628da877c5f4d9861a7 isdn4k-utils-3.6_pre20041219.ebuild 7116 MD5 e2cc85397eb8ff285f383213ab00cdad files/digest-isdn4k-utils-3.2_p1-r2 73 MD5 2dbc97316fbe5d721b9701347464e22c files/gcc33-multiline.patch 1977 MD5 8de88f6cf872f012abe1e320b3fb4336 files/digest-isdn4k-utils-3.5_pre20041110-r3 81 +MD5 6896aa81dfefd061abda1c5a4e6576a0 files/digest-isdn4k-utils-3.6_pre20041219 81 MD5 2f4c186b729606b475e17a0ea54189c9 files/3.2_p1-r2/config 2405 MD5 7ce4e9c2bb9dee4d231ae8da54a06b9f files/3.2_p1-r2/gentoo.patch 2383 MD5 92412760dfacc81cfac908d522ac8e39 files/3.2_p1-r2/ioptions 86 @@ -28,10 +30,26 @@ MD5 b49a72df686b7a94d7ac291a91f20fc5 files/3.5_pre20041110/ioptions 323 MD5 b75b68506a43d3d897d7b32eb280b42e files/3.5_pre20041110/ip-down 956 MD5 38984b8cf470784c9052f566b4faa5d8 files/3.5_pre20041110/ip-up 1105 MD5 02118ba89fc41144086224482bff7422 files/3.5_pre20041110/options.ippp0 685 +MD5 cd0fb0c848a80ea2f686b351f73b96b0 files/3.6_pre20041219/config 2693 +MD5 70260eb2e7f6faaa5698ab95b125f4b0 files/3.6_pre20041219/net.ippp0 2410 +MD5 ae970ec0c32e13878655a581742629b8 files/3.6_pre20041219/options.ippp0 685 +MD5 0ead941effdcf6061c864112d4a68ccb files/3.6_pre20041219/isdn.confd 500 +MD5 9c63ee81524f51cd1b9f419f00708195 files/3.6_pre20041219/hisax.usermap 188 +MD5 a130607607ec0e1e2cd76a19b35c616f files/3.6_pre20041219/isdn.blacklist 520 +MD5 3f7c76a6d63f3677b81157bf9a7e84cd files/3.6_pre20041219/isdnlog.initd 1047 +MD5 8c05ad5c213cfb5ad62cbd67ea0f2c0c files/3.6_pre20041219/isdnlog.logrotated 438 +MD5 875318ba2ae375b068d0c7a7c1607e52 files/3.6_pre20041219/ioptions 323 +MD5 673179cfabf5a9839cfbf81bc2eeb34e files/3.6_pre20041219/hisax.conf 1341 +MD5 39cf852699d3cdf350856fad76452352 files/3.6_pre20041219/hisax.initd 5817 +MD5 f26cdb4ad4237c11b371a7dcb2d89d17 files/3.6_pre20041219/isdnlog.confd 415 +MD5 a077770a61b46a7dbedad0213e5b14c3 files/3.6_pre20041219/auerswald.usermap 752 +MD5 229cfd79f14eb291f6bb46b1275d4e0c files/3.6_pre20041219/isdn.initd 2410 +MD5 5a554e2a04b9e11bb5bea839213bf97c files/3.6_pre20041219/ip-down 931 +MD5 054b3958fe0cfda4ac1420846fcc7a4b files/3.6_pre20041219/ip-up 1081 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) -iD8DBQFBsLQ4jtv59x0+BrURAqwJAJ9M3Ri9zecl/LvD3UzBp+fIkrS4UwCgpoBv -b8IqAhTTNY7ZFDvDOY0/k38= -=iaZg +iD8DBQFBy0Lcjtv59x0+BrURAvmWAKD3/F1XLygLfdm3YpzAMopMrswZqACePeIx +i6DIwqb9wHE+ojyOnduv23w= +=g8pe -----END PGP SIGNATURE----- diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/auerswald.usermap b/net-dialup/isdn4k-utils/files/3.6_pre20041219/auerswald.usermap new file mode 100644 index 000000000000..846c04b349bf --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/auerswald.usermap @@ -0,0 +1,4 @@ +auerswald 0x0003 0x09bf 0x00c0 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +auerswald 0x0003 0x09bf 0x00db 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +auerswald 0x0003 0x09bf 0x00f1 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +auerswald 0x0003 0x09bf 0x00f2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/config b/net-dialup/isdn4k-utils/files/3.6_pre20041219/config new file mode 100644 index 000000000000..f22ecec7e525 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/config @@ -0,0 +1,132 @@ +# +# Automatically generated by make menuconfig: don't edit +# + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# General configuration +# +CONFIG_BUILDX11=y +CONFIG_KERNELDIR='/usr/src/linux' +CONFIG_BINDIR='/usr/bin' +CONFIG_SBINDIR='/usr/sbin' +CONFIG_MANDIR='/usr/share/man' +CONFIG_RUNDIR='/var/run' +CONFIG_LOCKDIR='/var/lock' +CONFIG_LOCKFILE='LCK..' +CONFIG_I4LCONFDIR='/etc/isdn' +CONFIG_CONFFILE='isdn.conf' +CONFIG_CALLERIDFILE='callerid.conf' +CONFIG_USERCONFFILE='~/.isdn' +CONFIG_COUNTRYCODE='49' +CONFIG_AREACODE='89' +CONFIG_COUNTRY_PREFIX='+' +CONFIG_AREA_PREFIX='0' +CONFIG_DATADIR='/usr/share/isdn' + +# +# Runtime configuration tools +# +CONFIG_ISDNCTRL=y +CONFIG_ISDNCTRL_CONF=y +CONFIG_ISDNCTRL_TIMRU=y +CONFIG_ISDNCTRL_DWABC_UDP_INFO=y +CONFIG_IPROFD=y +CONFIG_DIVERTCTRL=y + +# +# Card configuration tools +# +CONFIG_HISAXCTRL=y +CONFIG_ICNCTRL=y +# CONFIG_ICNCTRL_DEBUG is not set +CONFIG_PCBITCTL=y +# CONFIG_AVMCAPICTRL is not set +CONFIG_ACTCTRL=y +CONFIG_EICONCTRL=y +CONFIG_LOOPCTRL=y +# CONFIG_LOOPCTRL_DEBUG is not set + +# +# Tools for monitoring activity +# +CONFIG_IMON=y +CONFIG_IMONTTY=y +CONFIG_ISDNLOG=y + +# +# Options for isdnlog package +# +CONFIG_ISDNLOG_SERV_PORT=20011 +CONFIG_ISDNLOG_USERFILE='isdnlog.users' +CONFIG_ISDNLOG_CHARGEFILE='charge.dat' +CONFIG_ISDNLOG_LOGFILE='/var/log/isdn.log' +CONFIG_ISDNLOG_RELOADCMD='/etc/init.d/isdn restart' +CONFIG_ISDNLOG_STOPCMD='/etc/init.d/isdn stop' +CONFIG_ISDNLOG_REBOOTCMD='/sbin/reboot' +CONFIG_ISDNLOG_DOCDIR='' +CONFIG_ISDNLOG_OLDI4LCONFDIR='/etc/isdnlog' +CONFIG_ISDNLOG_OLDI4LCONFFILE='isdnlog.conf' +# CONFIG_ISDNLOG_POSTGRES is not set +# CONFIG_ISDNLOG_MYSQLDB is not set +# CONFIG_ISDNLOG_ORACLE is not set +CONFIG_ISDN_LOG_XX=y +CONFIG_ISDN_LOG_CC='' +CONFIG_ISDN_LOG_CC_EN=y +CONFIG_ISDN_LOG_DEST_DE=y +CONFIG_ISDN_LOG_DEST_AT=y +CONFIG_ISDN_LOG_DEST_NL=y +CONFIG_ISDN_LOG_DEST_CH=y +CONFIG_ISDN_LOG_DEST_BE=y +CONFIG_ISDN_LOG_DEST_CN=y +CONFIG_IPPPSTATS=y +CONFIG_XISDNLOAD=y +CONFIG_XMONISDN=y + +# +# Options for xmonisdn +# +CONFIG_XMONISDN_UPCMD='/etc/isdn/netup' +CONFIG_XMONISDN_DOWNCMD='/etc/isdn/netdown' + +# +# Applications +# +# CONFIG_VBOX is not set +CONFIG_IPPPD=y + +# +# Options for ipppd +# +CONFIG_IPPPD_MSCHAP=y +CONFIG_IPPP_FILTER=y +# CONFIG_IPPPD_RADIUS is not set +# CONFIG_RADIUS_WTMP_LOGGING is not set +RADIUS_CLIENT_CONFIG_FILE='' +# CONFIG_CAPIFAX is not set +# CONFIG_RCAPID is not set +# CONFIG_PPPDCAPIPLUGIN is not set +CONFIG_EUROFILE=y + +# +# Options for eurofile +# +CONFIG_EFTD=y +CONFIG_EFTD_WUAUTH=y +CONFIG_EFTD_SERVER_MSN='' +# CONFIG_EFT_INSTALL_EFTD_SH is not set +CONFIG_EFTP=y +CONFIG_EFTP_READLINE=y +# CONFIG_EFTP_SETUID is not set +CONFIG_EFTP_CLIENT_MSN='' +CONFIG_EFT_INSTALL_CONF=y + +# +# Documentation +# +CONFIG_GENMAN=y +# CONFIG_FAQ is not set diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.conf b/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.conf new file mode 100644 index 000000000000..11a67b3a351d --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.conf @@ -0,0 +1,48 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.conf,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +# Please read the HiSax kernel documentation first: +# /usr/src/linux/Documentation/isdn/README.HiSax +# +# Then uncomment your cards below or add your own settings. +# If you want your specific card to be added to the list +# below, then drop me a line with your settings: +# Stefan Briesenick <sbriesen@gmx.de> + +# 'proto' can be: 1TR6 DSS1 NI1 LEASED +# 'debug' is optional, default is 4 (D-Channel Frames for isdnlog) +# 'id' is optional, but should be unique (see README.HiSax) + +# type proto io (io0,io1) irq mem debug id (optional) + +# Teles 16.0 +#1 DSS1 0xd80 5 0xd0000 - teles + +# Teles 16.3 +#3 DSS1 0x280 10 - - teles + +# Teles 16.3 PnP (values from isapnp setup, uses io0/io1) +#4 DSS1 0x580,0x180 10 - - teles + +# Fritz A1 +#5 DSS1 0x340 10 - - fritz + +# ELSA PCC/PCF +#6 DSS1 - - - - elsa + +# ELSA-QS3000 (values from isapnp setup) +#7 DSS1 0x160 3 - - qs3000 + +# Teles PCMCIA +#8 DSS1 0x180 15 - - teles + +# Sedlbauer Speed Fax+ PCI +#28 DSS1 - - - - speedfax + +# ASUSTeK ISDNLink P-IN100-ST-D (rev 02) +#35 DSS1 - - - - asustek + +# AVM Fritz PCI/PnP (fake type, will use hisax_fcpcipnp) +#99 DSS1 - - - - + diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.initd b/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.initd new file mode 100644 index 000000000000..002007adf5c7 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.initd @@ -0,0 +1,212 @@ +#!/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/isdn4k-utils/files/3.6_pre20041219/hisax.initd,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +opts="start stop" + +depend() { + use isapnp pcmcia +} + +check_module() { + /bin/grep 2>/dev/null -q "^${1} " /proc/modules +} + +get_first_free_idx() { + local -a _idxa + local _it _lin _idx=-1 + if ! read _it _lin < <(/usr/bin/head 2>/dev/null -n1 /dev/isdninfo); then + echo "0"; return + fi + read -a _idxa < <(echo $_lin) + while [ $_idx -lt 65 ]; do + : $((_idx++)) + if [ "${_idxa[$_idx]}" = "-" ]; then + echo $((_idx / 2)); return + fi + done +} + +read_config() { + HISAX_TYPE="" + HISAXFC_TYPE="" + HISAX_DEBUG="" + HISAX_FIRMWARE="" + HISAX_CNT=$(get_first_free_idx) + while read H_TYPE H_PROTO H_IO H_IRQ H_MEM H_DEBUG H_ID; do + + # check and set card id + case ${H_TYPE} in + 99) # AVM Fritz PCI/PnP + H_ID="#<FC>#" # fixed later + ;; + *) # all others + [ -z "${H_ID}" -o "${H_ID}" = "-" ] && H_ID="hisax${HISAX_CNT}" + H_ID="${H_ID//\%/-}"; H_ID="${H_ID// /_}" + ;; + esac + + # convert protocol to number + case "$H_PROTO" in + [eE][dD][sS][sS]1) H_PROTO_NR=2 ;; # EDSS1 + [eE][uU][rR][oO]) H_PROTO_NR=2 ;; # EDSS1 + [dD][sS][sS]1) H_PROTO_NR=2 ;; # EDSS1 + 1[tT][rR]6) H_PROTO_NR=1 ;; # 1TR6 + [nN][iI]1) H_PROTO_NR=4 ;; # NI1 + [lL][eE][aA][sS][eE][dD]) H_PROTO_NR=3 ;; # leased + *) return 1 ;; # error! + esac + + # split IO option (needed for Teles PnP) + if [ "${H_IO/,}" = "${H_IO}" ]; then + H_IO0="-" + H_IO1="-" + else + H_IO0="${H_IO%%,*}" + H_IO1="${H_IO##*,}" + H_IO="-" + fi + + # check debug option and build list + [ -z "${H_DEBUG}" -o "${H_DEBUG}" = "-" ] && H_DEBUG=4 + [ -z "${HISAX_DEBUG}" ] \ + && HISAX_DEBUG="${H_ID}%${H_DEBUG//\%}" \ + || HISAX_DEBUG="${HISAX_DEBUG} ${H_ID}%${H_DEBUG//\%}" + + # build list of cards which needs ISAR.BIN firmware + case ${H_TYPE} in + 28|29) [ -z "${HISAX_FIRMWARE}" ] \ + && HISAX_FIRMWARE="${H_ID}" \ + || HISAX_FIRMWARE="${HISAX_FIRMWARE} ${H_ID}" + ;; + esac + + # build options + case ${H_TYPE} in + 99) # AVM Fritz PCI/PnP + if [ -z "${HISAXFC_TYPE}" ]; then + HISAXFC_TYPE="${H_TYPE}" + HISAXFC_PROTO="${H_PROTO_NR}" + else + HISAXFC_TYPE="${HISAXFC_TYPE},${H_TYPE}" + HISAXFC_PROTO="${HISAXFC_PROTO},${H_PROTO_NR}" + fi + ;; + *) # all others + : $((HISAX_CNT++)) + if [ -z "${HISAX_TYPE}" ]; then + HISAX_TYPE="${H_TYPE}" + HISAX_IRQ="${H_IRQ//-}" + HISAX_MEM="${H_MEM//-}" + HISAX_IO="${H_IO//-}" + HISAX_IO0="${H_IO0//-}" + HISAX_IO1="${H_IO1//-}" + HISAX_ID="${H_ID}" + HISAX_PROTO="${H_PROTO_NR}" + HISAX_DUMMY="" + else + HISAX_TYPE="${HISAX_TYPE},${H_TYPE}" + HISAX_IRQ="${HISAX_IRQ},${H_IRQ//-}" + HISAX_IO="${HISAX_IO},${H_IO//-}" + HISAX_IO0="${HISAX_IO0},${H_IO0//-}" + HISAX_IO1="${HISAX_IO1},${H_IO1//-}" + HISAX_MEM="${HISAX_MEM},${H_MEM//-}" + HISAX_ID="${HISAX_ID}%${H_ID}" + HISAX_PROTO="${HISAX_PROTO},${H_PROTO_NR}" + HISAX_DUMMY="${HISAX_DUMMY}," + fi + ;; + esac + + done < <(/bin/sed 2>/dev/null -ne "s:^[[:space:]]*\([1-9][0-9]\?[[:space:]]\+[^#]*\)[#]*.*$:\1:p" "$@") + + # build final hisax options + if [ -n "$HISAX_TYPE" ]; then + HISAX_OPTIONS="type=${HISAX_TYPE}" + [ "$HISAX_IRQ" = "$HISAX_DUMMY" ] || HISAX_OPTIONS="${HISAX_OPTIONS} irq=${HISAX_IRQ}" + [ "$HISAX_IO" = "$HISAX_DUMMY" ] || HISAX_OPTIONS="${HISAX_OPTIONS} io=${HISAX_IO}" + [ "$HISAX_IO0" = "$HISAX_DUMMY" ] || HISAX_OPTIONS="${HISAX_OPTIONS} io0=${HISAX_IO0}" + [ "$HISAX_IO1" = "$HISAX_DUMMY" ] || HISAX_OPTIONS="${HISAX_OPTIONS} io1=${HISAX_IO1}" + [ "$HISAX_MEM" = "$HISAX_DUMMY" ] || HISAX_OPTIONS="${HISAX_OPTIONS} mem=${HISAX_MEM}" + HISAX_OPTIONS="${HISAX_OPTIONS} protocol=${HISAX_PROTO} id=${HISAX_ID}" + fi + + # build final hisax_fcpcipnp options + if [ -n "$HISAXFC_TYPE" ]; then + HISAXFC_OPTIONS="protocol=${HISAXFC_PROTO}" + fi + + return 0 +} + +start() { + if [ ! -e /etc/hisax.conf ]; then + eerror "You're missing /etc/hisax.conf" + return 1 + fi + + if ! read_config /etc/hisax.conf; then + eerror "You have an configuration error in /etc/hisax.conf" + return 1 + fi + + if [ -z "${HISAX_TYPE}" -a -z "${HISAXFC_TYPE}" ]; then + eerror "You have not configured /etc/hisax.conf" + return 1 + fi + + ebegin "Loading HiSax driver" + if [ -n "${HISAX_TYPE}" ]; then + /sbin/modprobe -s hisax ${HISAX_OPTIONS} && check_module hisax + if [ $? -ne 0 ]; then + /sbin/modprobe -sqr hisax_fcpcipnp + /sbin/modprobe -sqr hisax + eend 1; return 1 + fi + fi + if [ -n "${HISAXFC_TYPE}" ]; then + /sbin/modprobe -s hisax_fcpcipnp ${HISAXFC_OPTIONS} && check_module hisax_fcpcipnp + if [ $? -ne 0 ]; then + /sbin/modprobe -sqr hisax_fcpcipnp + /sbin/modprobe -sqr hisax + eend 1; return 1 + fi + fi + eend $? + + if [ -n "${HISAX_FIRMWARE}" ]; then + for ID in ${HISAX_FIRMWARE}; do + ebegin "Loading firmware to ${ID}" + /usr/sbin/hisaxctrl ${ID} 9 /lib/firmware/ISAR.BIN + if ! eend $?; then + /sbin/modprobe -sqr hisax_fcpcipnp + /sbin/modprobe -sqr hisax + return 1 + fi + done + fi + + CARDS="" + if [ -n "${HISAX_DEBUG}" ]; then + for DBG in ${HISAX_DEBUG}; do + ID="${DBG%%\%*}" + VAL="${DBG##*\%}" + if [ "${ID}" = "#<FC>#" ]; then + ID="fcpcipnp${HISAX_CNT}" + : $((HISAX_CNT++)) + fi + /usr/sbin/hisaxctrl ${ID} 1 ${VAL} + [ -z "${CARDS}" ] && CARDS="${ID}" || CARDS="${CARDS} ${ID}" + done + fi + + [ -n "${CARDS}" ] && einfo "HiSax cards: ${CARDS}" +} + +stop() { + ebegin "Unloading HiSax driver" + /sbin/modprobe -sqr hisax_fcpcipnp && /sbin/modprobe -sqr hisax + eend $? +} + diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.usermap b/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.usermap new file mode 100644 index 000000000000..62290f15e517 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/hisax.usermap @@ -0,0 +1 @@ +hisax 0x0003 0x0483 0x4810 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/ioptions b/net-dialup/isdn4k-utils/files/3.6_pre20041219/ioptions new file mode 100644 index 000000000000..c6bb76cfd48e --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/ioptions @@ -0,0 +1,6 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/ioptions,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +# System-wide configuration for ipppd. +# Normally, put all options into options.ipppX diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/ip-down b/net-dialup/isdn4k-utils/files/3.6_pre20041219/ip-down new file mode 100644 index 000000000000..77e05655a585 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/ip-down @@ -0,0 +1,37 @@ +#!/bin/sh + +# this is a script which is executed after disconnecting the ppp interface. +# look at man pppd for details + +# the followings parameters are available: +# $1 = interface-name +# $2 = tty-device +# $3 = speed +# $4 = local-IP-address +# $5 = remote-IP-address +# $6 = ipparam + +if [ "$USEPEERDNS" ]; then + + # taken from debian's 0000usepeerdns + # follow any symlink to find the real file + REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf) + + if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then + + # if an old resolv.conf file exists, restore it + if [ -e $REALRESOLVCONF.pppd-backup ]; then + mv $REALRESOLVCONF.pppd-backup $REALRESOLVCONF + fi + + fi + +fi + +# Recreate the default route so autodial works +[ -s /etc/conf.d/net ] && . /etc/conf.d/net +if [ -n "${gateway}" ] && [ "${gateway%/*}" = "$1" ]; then + /sbin/route add default dev ${gateway%/*} +fi + +[ -f /etc/ppp/ip-down.local ] && . /etc/ppp/ip-down.local "$@" diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/ip-up b/net-dialup/isdn4k-utils/files/3.6_pre20041219/ip-up new file mode 100644 index 000000000000..29719562096f --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/ip-up @@ -0,0 +1,42 @@ +#!/bin/sh + +# this is a script which is executed after connecting the ppp interface. +# look at man pppd for details + +# the followings parameters are available: +# $1 = interface-name +# $2 = tty-device +# $3 = speed +# $4 = local-IP-address +# $5 = remote-IP-address +# $6 = ipparam + +if [ "$USEPEERDNS" ]; then + + # add the server supplied DNS entries to /etc/resolv.conf + # (taken from debian's 0000usepeerdns) + + # follow any symlink to find the real file + REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf) + + if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then + + # merge the new nameservers with the other options from the old configuration + { + grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF + cat /etc/ppp/resolv.conf + } > $REALRESOLVCONF.tmp + + # backup the old configuration and install the new one + cp -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup + mv $REALRESOLVCONF.tmp $REALRESOLVCONF + + # correct permissions + chmod 0644 /etc/resolv.conf + chown root:root /etc/resolv.conf + + fi + +fi + +[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local "$@" diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.blacklist b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.blacklist new file mode 100644 index 000000000000..1b97ba1aa0c5 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.blacklist @@ -0,0 +1,20 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.blacklist,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +# ISDN modules are load from /etc/init.d/{isdn,hisax} +#auerswald +#divas +#act2000 +#hfc_usb +hisax +hisax_fcpcipnp +hisax_st5481 +#hysdn +#icn +#pcbit +#sc +#tpam + +# 2004-12-19 Stefan Briesenick <sbriesen@gmx.de> +# some modules temporarily disabled, because we need an init-script first diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.confd b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.confd new file mode 100644 index 000000000000..5ce05704ad54 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.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/isdn4k-utils/files/3.6_pre20041219/isdn.confd,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +# Location where isdnctrl will save its configuration +ISDNCTRL_CONFIG="/var/lib/isdn/isdnctrl.conf" + +# Location where iprofd will save the modem-register settings +# comment out if you don't want to use iprofd +IPROFD_SETTINGS="/var/lib/isdn/modem-register.dat" + diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.initd b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.initd new file mode 100644 index 000000000000..b0982a0fc6b1 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdn.initd @@ -0,0 +1,98 @@ +#!/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/isdn4k-utils/files/3.6_pre20041219/isdn.initd,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +opts="start stop save reload info show cards" + +depend() { + use capi hisax +} + +check_cards() { + local -a _idxa + local _it _lin _idx=0 + read _it _lin < <(/usr/bin/head 2>/dev/null -n1 /dev/isdninfo) || return 1 + read -a _idxa < <(echo $_lin) + while [ $_idx -lt 65 ]; do + [ "${_idxa[$_idx]}" = "-" ] || return 0 + : $((_idx+=2)); [ -z "${_idxa[$_idx]}" ] && break + done + return 1 +} + +check_module() { + /bin/grep 2>/dev/null -q "^${1} " /proc/modules +} + +start() { + /sbin/modprobe -s isdn && check_module isdn + if [ $? -ne 0 ]; then + eerror "ERROR: could not load ISDN driver" + /sbin/modprobe -sqr isdn + return 1 + fi + + if ! check_cards; then + eerror "ERROR: no ISDN cards available" + /sbin/modprobe -sqr isdn + return 1 + fi + + ebegin "Loading isdnctrl configuration" + [ ! -f "${ISDNCTRL_CONFIG}" ] || /usr/sbin/isdnctrl readconf "${ISDNCTRL_CONFIG}" >/dev/null + eend $? + + if [ -n "${IPROFD_SETTINGS}" ]; then + ebegin "Starting modem-register daemon" + start-stop-daemon --start --quiet --exec /usr/sbin/iprofd -- "${IPROFD_SETTINGS}" + eend $? + fi +} + +stop() { + if [ -n "${IPROFD_SETTINGS}" ]; then + ebegin "Stopping modem-register daemon" + start-stop-daemon --stop --quiet --retry 5 --exec /usr/sbin/iprofd + eend $? + fi + + ebegin "Unloading isdnctrl configuration" + /usr/sbin/isdnctrl reset force >/dev/null + eend $? +} + +save() { + ebegin "Saving isdnctrl configuration" + /usr/sbin/isdnctrl writeconf "${ISDNCTRL_CONFIG}" >/dev/null + eend $? +} + +reload() { + ebegin "Reloading isdnctrl configuration" + /usr/sbin/isdnctrl reset >/dev/null + [ ! -f "${ISDNCTRL_CONFIG}" ] || /usr/sbin/isdnctrl readconf "${ISDNCTRL_CONFIG}" >/dev/null + eend $? +} + +cards() { + local -a _idxa + local _it _lin _idx=0 + if ! read _it _lin < <(/usr/bin/head 2>/dev/null -n1 /dev/isdninfo); then + eerror "ERROR: no ISDN cards available" + return 1 + fi + read -a _idxa < <(echo $_lin) + while [ $_idx -lt 65 ]; do + [ "${_idxa[$_idx]}" = "-" ] || einfo "$((_idx / 2)) ${_idxa[$_idx]}" + : $((_idx+=2)); [ -z "${_idxa[$_idx]}" ] && break + done +} + +info() { + /usr/sbin/isdnctrl status all +} + +show() { + /usr/sbin/isdnctrl list all +} diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.confd b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.confd new file mode 100644 index 000000000000..5a4c87af788a --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.confd @@ -0,0 +1,10 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.confd,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +# here you can add some switches not covered by the +# corresponding /etc/isdnlog.options.contrX file. +# +# see "man (8) isdnlog" for further informations + +ISDNLOG_OPTIONS="" diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.initd b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.initd new file mode 100644 index 000000000000..e912179cd836 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.initd @@ -0,0 +1,33 @@ +#!/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/isdn4k-utils/files/3.6_pre20041219/isdnlog.initd,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +opts="start stop" + +depend() { + need isdn +} + +start() { + local CONTR="${myservice#*.contr}" CTRL=$((CONTR * 2)) + local CONFIG="/etc/isdn/isdnlog.isdnctrl${CTRL}.options" + [ -e "$CONFIG" ] || CONFIG="/etc/isdn/isdnlog.options.contr${CONTR}" + + if [ ! -e "$CONFIG" ] ; then + eerror "You're missing ${CONFIG}" + return 1 + fi + + ebegin "Starting ISDNLOG for controller #${CONTR}" + start-stop-daemon --start --quiet --pidfile "/var/run/isdnlog.isdnctrl${CTRL}.pid" \ + --exec /usr/sbin/isdnlog -- ${ISDNLOG_OPTIONS} -f "${CONFIG}" "/dev/isdnctrl${CTRL}" + eend $? +} + +stop() { + local CONTR="${myservice#*.contr}" CTRL=$((CONTR * 2)) + ebegin "Stopping ISDNLOG for controller #${CONTR}" + start-stop-daemon --stop --quiet --retry 5 --pidfile "/var/run/isdnlog.isdnctrl${CTRL}.pid" + eend $? +} diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.logrotated b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.logrotated new file mode 100644 index 000000000000..1ee3aab4a595 --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.logrotated @@ -0,0 +1,15 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/isdnlog.logrotated,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +# isdnlog logrotate snippet for Gentoo Linux +# contributed by Stefan Briesenick + +/var/log/isdn.log { + compress + rotate 99 + size=4096k + notifempty + missingok + copytruncate +} diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/net.ippp0 b/net-dialup/isdn4k-utils/files/3.6_pre20041219/net.ippp0 new file mode 100644 index 000000000000..b17f1dbf2a5b --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/net.ippp0 @@ -0,0 +1,100 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/net.ippp0,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +#NB: Config is in /etc/conf.d/net + +depend() { + need isdn +} + +checkconfig() { + if [ -z "$(eval echo \$\{iface_${IFACE}\})" ] + then + eerror "Please make sure that /etc/conf.d/net has \$iface_$IFACE set" + return 1 + fi +} + +start() { + checkconfig || return 1 + + local iface_args="$(eval echo \$\{iface_${IFACE}\})" + local ipppd_opts="" + + ebegin "Starting ipppd for ${IFACE}" + [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ] && ipppd_opts='defaultroute' + /usr/sbin/ipppd ${ipppd_opts} pidfile /var/run/ipppd.${IFACE}.pid file /etc/ppp/options.${IFACE} || { + local retval=$? + eend ${retval} "Failed to start ipppd" + return ${retval} + } + eend 0 + + ebegin "Bringing ${IFACE} up" + /sbin/ifconfig ${IFACE} ${iface_args} >/dev/null || { + local retval=$? + eend ${retval} "Failed to bring ${IFACE} up" + stop + return ${retval} + } + eend 0 + + if [ -n "$(eval echo \$\{inet6_${IFACE}\})" ] + then + local x="" + ebegin " Adding inet6 addresses" + for x in $(eval echo \$\{inet6_${IFACE}\}) + do + ebegin " ${IFACE} inet6 add ${x}" + /sbin/ifconfig ${IFACE} inet6 add ${x} >/dev/null + eend 0 + done + save_options "inet6" "$(eval echo \$\{inet6_${IFACE}\})" + fi + + if [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ] + then + ebegin " Setting default gateway" + /sbin/route add default dev ${gateway%/*} >/dev/null || { + local retval=$? + eend ${retval} "Failed to bring ${IFACE} up" + stop + return ${retval} + } + eend 0 + fi + + # Enabling rp_filter causes wacky packets to be auto-dropped by + # the kernel + if [ -e /proc/sys/net/ipv4/conf/${IFACE}/rp_filter ] + then + echo 1 > /proc/sys/net/ipv4/conf/${IFACE}/rp_filter + fi +} + +stop() { + local myinet6="$(get_options inet6)" + local pidfile="/var/run/ipppd.${IFACE}.pid" + + ebegin "Bringing ${IFACE} down" + + # Also down the inet6 interfaces + if [ -n "${myinet6}" ] + then + local x="" + for x in ${myinet6} + do + /sbin/ifconfig ${IFACE} inet6 del ${x} >/dev/null + done + fi + + /sbin/ifconfig ${IFACE} down >/dev/null + + # Kill ipppd + test -s "${pidfile}" && kill `cat ${pidfile}` + sleep 1 + test -s "${pidfile}" && sleep 2 && test -s "${pidfile}" && einfon "Killing ipppd" && kill -KILL `cat ${pidfile}` + + eend 0 +} diff --git a/net-dialup/isdn4k-utils/files/3.6_pre20041219/options.ippp0 b/net-dialup/isdn4k-utils/files/3.6_pre20041219/options.ippp0 new file mode 100644 index 000000000000..9ddfc249692b --- /dev/null +++ b/net-dialup/isdn4k-utils/files/3.6_pre20041219/options.ippp0 @@ -0,0 +1,29 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.6_pre20041219/options.ippp0,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +# Example config for a personal ISP dialin +# see "man ipppd" for explanation of all possible options + +# for the defaultroute setting, look in /etc/conf.d/net + +/dev/isdn/ippp0 + +# you have to put login and password into /etc/ppp/pap-secrets too + +name "insert ppp login here" + +lock +ipcp-accept-local +ipcp-accept-remote +noipdefault + +# You might want to try these if you have problems: +#-vj +#-vjccomp +#-ac +#-pc +#-bsdcomp +#mru 1524 +#mtu 1500 +#noccp diff --git a/net-dialup/isdn4k-utils/files/digest-isdn4k-utils-3.6_pre20041219 b/net-dialup/isdn4k-utils/files/digest-isdn4k-utils-3.6_pre20041219 new file mode 100644 index 000000000000..d06a0598e7ea --- /dev/null +++ b/net-dialup/isdn4k-utils/files/digest-isdn4k-utils-3.6_pre20041219 @@ -0,0 +1 @@ +MD5 33fef708148754175bc74db46e986c01 isdn4k-utils-CVS-2004-12-19.tar.bz2 5515217 diff --git a/net-dialup/isdn4k-utils/isdn4k-utils-3.6_pre20041219.ebuild b/net-dialup/isdn4k-utils/isdn4k-utils-3.6_pre20041219.ebuild new file mode 100644 index 000000000000..514cf7dbd59d --- /dev/null +++ b/net-dialup/isdn4k-utils/isdn4k-utils-3.6_pre20041219.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/isdn4k-utils-3.6_pre20041219.ebuild,v 1.1 2004/12/23 22:12:34 mrness Exp $ + +inherit eutils + +MY_PV="${PV/*_pre/}" +MY_P="${PN}-CVS-${MY_PV:0:4}-${MY_PV:4:2}-${MY_PV:6:2}" + +DESCRIPTION="ISDN4Linux Utils" +SRC_URI="ftp://ftp.isdn4linux.de/pub/isdn4linux/CVS-Snapshots/${MY_P}.tar.bz2" +HOMEPAGE="http://www.isdn4linux.de/" + +KEYWORDS="~x86 ~amd64 ~alpha" +LICENSE="GPL-2" +IUSE="X unicode" +SLOT="0" + +DEPEND="virtual/linux-sources + virtual/libc + sys-libs/ncurses + sys-libs/gdbm + dev-lang/tcl + X? ( virtual/x11 )" +RDEPEND="${DEPEND} + virtual/modutils" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + # Get country code from I4L_CC variable + # default country: DE (Germany) + I4L_CC=$(echo -n "${I4L_CC}" | tr "[:lower:]" "[:upper:]") + [ -z "${I4L_CC}" ] && I4L_CC="DE" + I4L_CC_LOW=$(echo -n "${I4L_CC}" | tr "[:upper:]" "[:lower:]") + + # Get language from I4L_LANG variable ('de' or 'en') + I4L_LANG=$(echo -n "${I4L_CC}" | tr "[:lower:]" "[:upper:]") + if [ -z "${I4L_LANG}" ]; then + case "${I4L_CC}" in + AT|CH|DE) + I4L_LANG="DE" + ;; + *) + I4L_LANG="EN" + ;; + esac + fi + [ "${I4L_LANG}" = "DE" -o "${I4L_LANG}" = "EN" ] || I4L_LANG="EN" +} + +src_unpack() { + unpack ${A} + cd ${S} + + # fix for 2.6 headers + find . -name "*.c" | \ + xargs -r sed -i -e 's:linux/capi.h>$:linux/compiler.h>\n#include <linux/capi.h>:g' + + # patch all Makefiles to use our CFLAGS + find . -name "Makefile*" | \ + xargs -r sed -i -e "s:^CFLAGS\(.*\)-O[26]:CFLAGS\1${CFLAGS}:g" \ + -e "s:^CFLAGS\(.*\)-g:CFLAGS\1${CFLAGS}:g" \ + -e "s:^CFLAGS = -Wall$:CFLAGS = ${CFLAGS}:g" || die "sed failed" + + # install our config + case "${I4L_CC}" in + DE|AT|NL|LU|CH) + # These countries are specially supported in the isdnlog source. + sed -e "s:^CONFIG_ISDN_LOG_XX=:CONFIG_ISDN_LOG_${I4L_CC}=:g" -e "s:^CONFIG_ISDN_LOG_CC=.*$:#:g" \ + -e "s:^\(CONFIG_ISDN_LOG_CC_\)..=:\1${I4L_LANG}=:g" < ${FILESDIR}/${PV}/config > .config || die "failed to modify .config" + ;; + *) + # Others get a generic isdnlog. + sed -e "s:^\(CONFIG_ISDN_LOG_CC=\).*$:\1'${I4L_CC_LOW}':g" \ + -e "s:^\(CONFIG_ISDN_LOG_CC_\)..=:\1${I4L_LANG}=:g" < ${FILESDIR}/${PV}/config > .config || die "failed to modify .config" + ;; + esac + + useq X || \ + sed -i -e "s:^CONFIG_BUILDX11=.*$:#:g" \ + -e "s:^CONFIG_XISDNLOAD=.*$:#:g" \ + -e "s:^CONFIG_XMONISDN=.*$:#:g" .config + + # Patch in order to make generic config for countries which are not known to isdnlog source + sed -i -e "s:\$(INSTALL_DATA) rate-:-\$(INSTALL_DATA) rate-:g" \ + -e "s:\$(INSTALL_DATA) holiday-:-\$(INSTALL_DATA) holiday-:g" isdnlog/Makefile.in + + # if specified, convert all relevant files from latin1 to UTF-8 + if useq unicode; then + for i in isdnlog/samples/{isdn,rate}.conf* isdnlog/*-{at,ch,de,no}.dat isdnlog/{Isdn,.country-alias}; do + iconv -f latin1 -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~" + done + fi +} + +src_compile() { + make subconfig || die "make subconfig failed" + make || die "make failed" +} + +src_install() { + keepdir /var/lib/isdn + dodir /dev /etc/isdn /usr/bin /usr/sbin + make DESTDIR=${D} install || die "make install failed" + + # remove obsolete firmware files (these are in net-dialup/isdn-firmware) + rm -f ${D}/usr/share/isdn/{bip1120.btl,dnload.bin,ds4bri.bit,dspdload.bin} + rm -f ${D}/usr/share/isdn/{loadpg.bin,pc_??_ca.bin,prload.bin,te_????.*} + + # move ISAR.BIN (hisax firmware) to /lib/firmware + insinto /lib/firmware + doins ${D}/usr/share/isdn/ISAR.BIN + rm -f ${D}/usr/share/isdn/ISAR.BIN + + # install autoload/hotplug blacklist + insinto /etc/hotplug/blacklist.d + newins ${FILESDIR}/${PV}/isdn.blacklist isdn + + # install docs (base) + dodoc NEWS README Mini-FAQ/isdn-faq.txt scripts/makedev.sh FAQ/_howto/xp* + + # install docs (ipppd) + docinto ipppd + dodoc LEGAL.ipppcomp ipppd/{README,README.*.ORIG,NOTES.IPPPD} ipppcomp/README.LZS # ipppd/README.RADIUS + docinto ipppd/example + dodoc FAQ/_example/*.txt + docinto ipppd/howto + dodoc FAQ/_howto/{dns*,i4l_ipx*,isdn*,lan*,leased*,masq*,mppp*,ppp*,route*} + + # install docs (isdnlog) + docinto isdnlog + dodoc isdnlog/{BUGS,FAQ,Isdn,NEWS,README*} FAQ/_howto/win* + docinto isdnlog/areacode + dodoc areacode/*.doc + docinto isdnlog/contrib/isdnbill + dodoc isdnlog/contrib/isdnbill/{*.isdnbill,*.gz} + docinto isdnlog/contrib/winpopup + dodoc isdnlog/contrib/winpopup/* + + # install docs (eft) + docinto eft + dodoc eurofile/{CHANGES,INSTALL,README*,TODO} + newdoc eurofile/src/wuauth/README README.AUTHLIB + docinto eft/scripts + dodoc eurofile/scripts/{eft_useradd,check_system,ix25test,eftd.sh,eftp.sh} + + # install init-scripts + newinitd ${FILESDIR}/${PV}/isdn.initd isdn + newinitd ${FILESDIR}/${PV}/hisax.initd hisax + newinitd ${FILESDIR}/${PV}/net.ippp0 net.ippp0 + newinitd ${FILESDIR}/${PV}/isdnlog.initd isdnlog.contr0 + + # install init-configs + dodir /etc/conf.d # BUG: w/o newconfd failes + newconfd ${FILESDIR}/${PV}/isdn.confd isdn + newconfd ${FILESDIR}/${PV}/isdnlog.confd isdnlog.contr0 + + # install example ippp scripts and configs + exeinto /etc/ppp + insinto /etc/ppp + doexe ${FILESDIR}/${PV}/{ip-up,ip-down} + doins ${FILESDIR}/${PV}/{ioptions,options.ippp0} + + # install example isdn configs + insinto /etc/isdn + doins isdnlog/samples/{isdn,rate}.conf.{at,de,lu,nl,no,pl} + newins isdnlog/samples/isdn.conf isdn.conf.unknown + if [ -f isdnlog/samples/isdn.conf.${I4L_CC_LOW} ]; then + newins isdnlog/samples/isdn.conf.${I4L_CC_LOW} isdn.conf + else + doins isdnlog/samples/isdn.conf + fi + if [ -f isdnlog/samples/rate.conf.${I4L_CC_LOW} ]; then + newins isdnlog/samples/rate.conf.${I4L_CC_LOW} rate.conf + fi + sed -i -e "s:/usr/lib/isdn/:/usr/share/isdn/:g" ${D}/etc/isdn/isdn.conf* + + # install example hisax config + insinto /etc + doins ${FILESDIR}/${PV}/hisax.conf + + # install sample provider script + exeinto /etc/isdn + doexe isdnlog/samples/provider + + # rename isdnlog options file + insinto /etc/isdn + mv -f ${D}/etc/isdn/isdnlog.isdnctrl0.options ${D}/etc/isdn/isdnlog.options.contr0 + + # install isdnlog data files + insinto /usr/share/isdn + doins isdnlog/*.dat + + # install logrotate configs + insinto /etc/logrotate.d + newins ${FILESDIR}/${PV}/isdnlog.logrotated isdnlog +} + +pkg_postinst() { + einfo + einfo "Please edit:" + einfo + einfo "- /etc/conf.d/isdn to contain your ISDN kernel modules" + einfo "- /etc/hisax.conf if you have hisax supported cards" + einfo "- /etc/ppp/* critical if you need networking" + einfo + einfo "For isdnlog you should edit:" + einfo + einfo "- /etc/conf.d/isdnlog.contr0" + einfo "- /etc/isdn/isdnlog.options.contr0" + einfo "- /etc/isdn/*.conf" + einfo + einfo "/etc/init.d/isdn will save and restore your isdnctrl config." + einfo "it will also handle the modem-register daemon." + einfo + einfo "/etc/init.d/net.ippp0 will start synchronous PPP connections" + einfo "which you need to set up using isdnctrl first!" + einfo + einfo "/etc/init.d/isdnlog.contr0 starts and stops isdnlog for contr0" + einfo "You can symlink it to isdnlog.contr1 and copy the corresponding" + einfo "configs if you have more than one card." + einfo +} |