diff options
author | Stefan Briesenick <sbriesen@gentoo.org> | 2005-07-20 18:47:52 +0000 |
---|---|---|
committer | Stefan Briesenick <sbriesen@gentoo.org> | 2005-07-20 18:47:52 +0000 |
commit | db40bfbc8ce3670e6ef65f019a92401503b87e7a (patch) | |
tree | ca8e10fd847b9bf6927470dbb4e93be231772002 /net-dialup/capi4k-utils | |
parent | Version bump due security bug, bug #99583 (diff) | |
download | historical-db40bfbc8ce3670e6ef65f019a92401503b87e7a.tar.gz historical-db40bfbc8ce3670e6ef65f019a92401503b87e7a.tar.bz2 historical-db40bfbc8ce3670e6ef65f019a92401503b87e7a.zip |
now hotplug-script looks in different locations for firmware files also (same behaviour as 'capiinit')
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'net-dialup/capi4k-utils')
-rw-r--r-- | net-dialup/capi4k-utils/ChangeLog | 6 | ||||
-rw-r--r-- | net-dialup/capi4k-utils/Manifest | 4 | ||||
-rw-r--r-- | net-dialup/capi4k-utils/files/capi.hotplug | 27 |
3 files changed, 28 insertions, 9 deletions
diff --git a/net-dialup/capi4k-utils/ChangeLog b/net-dialup/capi4k-utils/ChangeLog index 07577c881b38..75b15ebf7786 100644 --- a/net-dialup/capi4k-utils/ChangeLog +++ b/net-dialup/capi4k-utils/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-dialup/capi4k-utils # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.37 2005/07/18 21:05:33 sbriesen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.38 2005/07/20 18:47:52 sbriesen Exp $ + + 20 Jul 2005; Stefan Briesenick <sbriesen@gentoo.org> files/capi.hotplug: + now hotplug-script looks in different locations for firmware files also + (same behaviour as 'capiinit') *capi4k-utils-20050718 (18 Jul 2005) diff --git a/net-dialup/capi4k-utils/Manifest b/net-dialup/capi4k-utils/Manifest index b3c2c47023b1..10fe501123ab 100644 --- a/net-dialup/capi4k-utils/Manifest +++ b/net-dialup/capi4k-utils/Manifest @@ -1,7 +1,7 @@ MD5 5dc6f506ad44aae8328d0690e94eb688 capi4k-utils-20041006-r5.ebuild 3736 MD5 03243c209893699ce44a97f2090546fe capi4k-utils-20050322-r1.ebuild 4014 MD5 2c1a45b850f5072a7e30fb95cada2fa0 capi4k-utils-20050718.ebuild 3978 -MD5 519ddd06ee3a9c01ed7e5e73cbc67ae7 ChangeLog 7249 +MD5 f0a3e90be72747b99cc7b0e310deefd2 ChangeLog 7432 MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 MD5 aa0258d1e27f2b71ec2a6a950127831f capi4k-utils-20050509.ebuild 3977 MD5 c1f67e98c19fe5ece86b9242a00e6a38 files/README.gentoo 2800 @@ -16,7 +16,7 @@ MD5 2fe94d2623c5b129780b72bacaf4a7bc files/rcapid.xinetd 236 MD5 239b613eb69255eead19892de760db8d files/digest-capi4k-utils-20050509 75 MD5 2ab6ed3bc0de68c33e2ade1979dd4c0a files/digest-capi4k-utils-20050718 75 MD5 97a56dd67a012daab67041ed96a6d44d files/capi.blacklist 530 -MD5 da21db7a9d1b9fdfb20e73409660143e files/capi.hotplug 4730 +MD5 c573d252a8c70f78956fbdd3985e1d92 files/capi.hotplug 5045 MD5 709e4079ecd09537691845755cb9136d files/digest-capi4k-utils-20050322-r1 75 MD5 e74f9b822b6f485ca6ff834c2699151a files/20041006/README.gentoo 1492 MD5 fb9f9b4003d8d1647e23cf7b329386f6 files/20041006/capi.confd 424 diff --git a/net-dialup/capi4k-utils/files/capi.hotplug b/net-dialup/capi4k-utils/files/capi.hotplug index 9fcc51c0b731..467abee14fd3 100644 --- a/net-dialup/capi4k-utils/files/capi.hotplug +++ b/net-dialup/capi4k-utils/files/capi.hotplug @@ -1,12 +1,15 @@ #!/bin/bash # Copyright 1999-2005 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.8 2005/05/31 19:41:48 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi.hotplug,v 1.9 2005/07/20 18:47:52 sbriesen Exp $ . /etc/conf.d/capi [ "$CAPI_HOTPLUG_USB" = "yes" ] || exit 0 +# possible firmware locations (list and order taken from 'capiinit') +FWDIRS=(/lib/firmware/isdn /lib/firmware /usr/share/isdn /usr/lib/isdn /lib/isdn) + # Syslog output syslog() { # <msg> /usr/bin/logger -t "capi-usb" "$1" @@ -29,13 +32,24 @@ cardinfo() { # <driver> /proc/capi/controller 2>/dev/null } +# Firmware search +findfw() { # <fw_name> + local DIR + for DIR in ${FWDIRS[*]}; do + if [ -f "${DIR}/${1}" ]; then + echo "${DIR}/${1}"; return 0 + fi + done + return 1 +} + # AVM firmware loader avmusb() { # <driver> <usbdev> <firmware> local CARD NAME STATUS TYPE VER DEV FIRMWARE while read CARD NAME STATUS TYPE VER DEV; do # AVM cardinfo if [ "${STATUS}" = "detected" -a ${DEV} -eq ${2} ]; then - syslog "loading firmware '${3}' onto controller ${CARD} (${NAME})" - /usr/sbin/avmcapictrl load "/lib/firmware/${3}" "${CARD}" || return 1 + syslog "loading firmware '${3##*/}' onto controller ${CARD} (${NAME})" + /usr/sbin/avmcapictrl load "${3}" "${CARD}" || return 1 break fi done < <(cardinfo "${1}") @@ -145,13 +159,14 @@ case "$ACTION" in while [ ! -e /dev/capi20 -a $CNT -lt 20 ]; do sleep 0.5; : $((CNT++)) done - if [ -f "/lib/firmware/${FIRMWARE}" ]; then - if ! $LOADER $DRIVER $USBDEV $FIRMWARE; then + FW=$(findfw "${FIRMWARE}") + if [ -n "${FW}" ]; then + if ! $LOADER $DRIVER $USBDEV $FW; then syslog "could not load firmware!" beep_error; exit 1 fi else - syslog "firmware ${FIRMWARE} not found in /lib/firmware!" + syslog "firmware ${FIRMWARE} not found in ${FWDIRS[0]}" beep_error; exit 1 fi fi |