summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2008-04-20 23:00:46 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2008-04-20 23:00:46 +0000
commit1a79ad748e3d876b8c43f431d9bd9b5d4a42bfda (patch)
tree5efbb4bfaa79bf64fff22a0890424c1f180306b3 /net-dialup
parentAdd GCC 4.3 patch from Debian. Reported by Peter Alfredsen in bug (diff)
downloadhistorical-1a79ad748e3d876b8c43f431d9bd9b5d4a42bfda.tar.gz
historical-1a79ad748e3d876b8c43f431d9bd9b5d4a42bfda.tar.bz2
historical-1a79ad748e3d876b8c43f431d9bd9b5d4a42bfda.zip
made init-script posix-shell compatible
Package-Manager: portage-2.1.5_rc5
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/capi4k-utils/ChangeLog5
-rw-r--r--net-dialup/capi4k-utils/Manifest4
-rw-r--r--net-dialup/capi4k-utils/files/capi.initd61
3 files changed, 38 insertions, 32 deletions
diff --git a/net-dialup/capi4k-utils/ChangeLog b/net-dialup/capi4k-utils/ChangeLog
index 8536f3d8e13f..66057c4f9dff 100644
--- a/net-dialup/capi4k-utils/ChangeLog
+++ b/net-dialup/capi4k-utils/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-dialup/capi4k-utils
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.60 2008/01/20 11:48:51 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.61 2008/04/20 23:00:45 sbriesen Exp $
+
+ 20 Apr 2008; Stefan Briesenick <sbriesen@gentoo.org> files/capi.initd:
+ made init-script posix-shell compatible
20 Jan 2008; Stefan Briesenick <sbriesen@gentoo.org>
+files/capi20-types.diff, capi4k-utils-20050718-r3.ebuild:
diff --git a/net-dialup/capi4k-utils/Manifest b/net-dialup/capi4k-utils/Manifest
index 647b24743a09..7a6595f1d4d3 100644
--- a/net-dialup/capi4k-utils/Manifest
+++ b/net-dialup/capi4k-utils/Manifest
@@ -4,7 +4,7 @@ AUX capi.blacklist 335 RMD160 658325be7cead00dfac420c846f27cef390c5ea8 SHA1 5dd5
AUX capi.conf 2087 RMD160 e40ded18c725ac67b47341e76e007a6ca4a5d60a SHA1 55c9fec7cfe9b0a6c3e21be392d28120e705d633 SHA256 3b55c9ca75322b99cc1772d9fe6591b5eda44d13c4026e4eadeb19c1cbd200c5
AUX capi.confd 837 RMD160 d1223859e46ea41945765ffef0873b337319423b SHA1 6d98c240f3a3de892b9c5a69ac5eff39f2e63377 SHA256 a733f5ddc7acc17cc201b907bf00be5eb284046447d1fb943fdb3d799c32e240
AUX capi.hotplug 5089 RMD160 d64ea835e632bc5782144bec4936fc19fb4bbd7f SHA1 b74c82fa41be0419e78848b108e6ea0ffe4258c9 SHA256 7d089b87c79ce7583abcaecbe448615a3d5ae0e3c9d614a95f7cfef55a080d33
-AUX capi.initd 4756 RMD160 c33c488165711f89567f6ec51a1a90134b99aaa6 SHA1 866813ce896c7a9f21884ee97b96af4c2c3912ab SHA256 ed1ab8d0ae3fca8ef91c07469237b3feaed7647191bd11671b0deddeaae9ec3b
+AUX capi.initd 4693 RMD160 df0e708b173db4165e809c1114f24fd3e48140a2 SHA1 871ff578f14d080b03477b48e263a34c44f45721 SHA256 98994626baf52447c3a020913d582023c0aeee4a2e13675d78c61ef83e82be76
AUX capi.pcmcia 762 RMD160 d20e08f74b8bc5972d064257396cd1b3211a0a73 SHA1 e4986dc7ebe42c8997274227807936d29740a717 SHA256 9f960f018fb9baa68518a09c7039a489c5dce8c9e9351ac518996123c35f4aa5
AUX capi.pcmcia.conf 1218 RMD160 80494b069ae7776e3700934f0b4b8fc993f950d2 SHA1 118993325f3a70347f659a97325eb8bfa5201576 SHA256 2e86b2c4551fb536ef90b1f51e3b2abab423dd1bd8c75ebf0365a43001c09019
AUX capi.usermap 1663 RMD160 27b6dab9e39f79dbefdd6cffe4e814be9a99f0c5 SHA1 869a7bf2c0bfe9acc61ab2f8e6c8c7042ec8877c SHA256 6e2750a3b2b69a9ea78239cb41b2c63893a8c479fcb80dfe0b7f2b9b6bc61055
@@ -14,5 +14,5 @@ AUX rcapid.xinetd 236 RMD160 070f398e02331f62849d0ff9469beae6d14076ef SHA1 ba587
DIST capi4k-patches-20050718-r3.tar.bz2 11871 RMD160 010ef7c6f7cdfc87c7d4ef7622407a5d596c3600 SHA1 429f54974716ea4b3c4379d81bad507eb7739466 SHA256 aa085e7ce700e3a698af99675da419952e6afd8d76b9c641faedc098547c08b3
DIST capi4k-utils-2005-07-18.tar.gz 862826 RMD160 cadd13328aeef50ab26218614176b4f368b0b19d SHA1 df8590d2b933d8230838667666790ca0ba708b5c SHA256 b162d726a31310fc29e7c0a25a4f82a590457f6a95c1b1168bcd72b6497b5746
EBUILD capi4k-utils-20050718-r3.ebuild 5331 RMD160 cb30f1f09ffdbb60972cbd07876531f8532924c0 SHA1 185a3c2fce1af2d761ff20f8eb86592df662c283 SHA256 0bb2edf62185a7ee12180f63778105fc9b54dee09a908b2595b46cec8f5f8a1c
-MISC ChangeLog 10914 RMD160 dedeb8b645a8a921a25e13046ca0540c550925d0 SHA1 162091262ac4ae7dc95e1c5f78bc916b3fc4b3db SHA256 e0a385689c18471d05c90b8618b00885347b514ff9e13f366454c1ead209e08f
+MISC ChangeLog 11030 RMD160 49807b1f2c54213aab35608ac48fe1e9be3eeb0f SHA1 7adf897eab1b6199e2ec98ee7397bff72a1a07fe SHA256 a9ce0f2f62f586b609d2c777196add1123b95637bfe85627e2c5df5bf249fd20
MISC metadata.xml 618 RMD160 7dc735e007ea83f896fae31e70ce14b5410035fa SHA1 89000a29d9233eb928388c169cb0993c0f187370 SHA256 b99ca46c9cdbd485f0fc6c1cfe135d9e999b515da81632fb5330ebae8a3d025c
diff --git a/net-dialup/capi4k-utils/files/capi.initd b/net-dialup/capi4k-utils/files/capi.initd
index 007fb8b58bf6..1f6120dbc5e5 100644
--- a/net-dialup/capi4k-utils/files/capi.initd
+++ b/net-dialup/capi4k-utils/files/capi.initd
@@ -1,21 +1,21 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2008 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.7 2005/09/03 20:25:17 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi.initd,v 1.8 2008/04/20 23:00:46 sbriesen Exp $
opts="info showconfig"
depend() {
- after isapnp pcmcia bluetooth hotplug
+ after isapnp pcmcia bluetooth
}
# possible firmware locations (list and order taken from 'capiinit')
-FWDIRS=(/lib/firmware/isdn /lib/firmware /usr/share/isdn /usr/lib/isdn /lib/isdn)
+FWDIRS="/lib/firmware/isdn /lib/firmware /usr/share/isdn /usr/lib/isdn /lib/isdn"
# Firmware search
findfw() { # <fw_name>
local DIR
- for DIR in ${FWDIRS[*]}; do
+ for DIR in ${FWDIRS}; do
if [ -f "${DIR}/${1}" ]; then
echo "${DIR}/${1}"; return 0
fi
@@ -26,26 +26,27 @@ findfw() { # <fw_name>
# looking for 'detected' cards (currently only 'sedlfax')
detected() { # <driver>
# /proc/capi/controller: <controller> <drivername> <state> <cardname> <controllerinfo>
- /bin/sed -n "s:^\([1-9][0-9]*\) \+${1} \+detected \+.*:\1:p" \
+ sed -n "s:^\([1-9][0-9]*\) \+${1} \+detected \+.*:\1:p" \
/proc/capi/controller 2>/dev/null
}
# detecting loaded mISDN modules
misdn_modules() {
- /bin/sed -n "s:^mISDN_core \+[0-9]\+ \+[0-9]\+ \+\([^ ]\+\).*\$:\1:p" \
- /proc/modules 2>/dev/null | /bin/tr "," " "
+ sed -n "s:^mISDN_core \+[0-9]\+ \+[0-9]\+ \+\([^ ]\+\).*\$:\1:p" \
+ /proc/modules 2>/dev/null | tr "," " "
}
# detecting loaded CAPI drivers
capi_drivers() {
local DRV MISDN=0
- while read DRV; do
+ for DRV in $(sed -n "s:^[0-9]\+ \+\([^ ]\+\).*\$:\1:p" /proc/capi/controller 2>/dev/null); do
case "${DRV}" in
mISDN) MISDN=1;;
?*) echo "${DRV}";;
esac
- done < <(/bin/sed 2>/dev/null -n "s:^[0-9]\+ \+\([^ ]\+\).*\$:\1:p" /proc/capi/controller)
- if [ ${MISDN} -gt 0 ]; then # dirty hack to find loaded mISDN modules
+ done
+ # dirty hack to find loaded mISDN modules
+ if [ ${MISDN} -gt 0 ]; then
for DRV in $(misdn_modules); do
case "${DRV}" in
mISDN_*|l3udss1|faxl3) continue;;
@@ -58,7 +59,7 @@ capi_drivers() {
# detecting bluetooth CIP connections
bluez_cip() {
[ -x /usr/bin/ciptool ] && \
- /bin/sed -n "s:[0-9]\+ \+cmtp \+[^ ]\+ \+\([0-9A-F:]\+\) \+.*\$:\1:p" \
+ sed -n "s:[0-9]\+ \+cmtp \+[^ ]\+ \+\([0-9A-F:]\+\) \+.*\$:\1:p" \
/proc/capi/controller 2>/dev/null
}
@@ -81,7 +82,7 @@ start() {
done
ebegin "Starting CAPI"
- /usr/sbin/capiinit 2>/dev/null activate
+ /usr/sbin/capiinit activate 2>/dev/null
if eend $?; then
local CIP MSG INFO FW CARD MISDN
@@ -93,11 +94,11 @@ start() {
if [ -n "${FW}" ]; then
for CARD in ${MISDN}; do
ebegin "Loading firmware '${FW##*/}' onto controller ${CARD}"
- /usr/sbin/avmcapictrl &>/dev/null load "${FW}" "${CARD}"
+ /usr/sbin/avmcapictrl load "${FW}" "${CARD}" 2>&1 >/dev/null
eend $?
done
else
- eerror "Firmware 'ISAR.BIN' not found in ${FWDIRS[0]}"
+ eerror "Firmware 'ISAR.BIN' not found in ${FWDIRS%% *}"
fi
fi
@@ -105,10 +106,10 @@ start() {
if [ -n "${CAPI_CIP_DEVICES}" -a -x /usr/bin/ciptool ]; then
for CIP in ${CAPI_CIP_DEVICES}; do
ebegin "CIP connect to ${CIP}"
- INFO=$(/usr/bin/ciptool 2>&1 connect "${CIP}")
+ INFO=$(/usr/bin/ciptool connect "${CIP}" 2>&1)
if ! eend $?; then
[ -n "${INFO}" ] && \
- while read line MSG; do eerror " ${MSG}"; done < <(echo "${INFO}")
+ echo "${INFO}" | while read line MSG; do eerror " ${MSG}"; done
fi
done
sleep 0.3 # give subsystems time to initialize
@@ -118,26 +119,26 @@ start() {
[ -f /proc/capi/capidrv -o "${CAPI_LOAD_CAPIDRV}" != "yes" ] || /sbin/modprobe -s capidrv
# show controllers
- INFO=$(</proc/capi/controller)
+ INFO=$(cat /proc/capi/controller)
if [ -n "${INFO}" ]; then
einfo "Available CAPI controllers:"
- while read MSG; do einfo " ${MSG}"; done < <(echo "${INFO}")
+ echo "${INFO}" | while read MSG; do einfo " ${MSG}"; done
fi
fi
return 0 # never fail
}
stop() {
- local DRV CIP RET FCNT=0 DRIVERS=$(/bin/sort -u <(capi_drivers))
+ local DRV CIP RET FCNT=0 DRIVERS=$(capi_drivers | sort -u)
# if some CAPI applications are still running, kill 'em
- if /bin/fuser 2>/dev/null -s /dev/capi20; then
+ if fuser -s /dev/capi20 2>/dev/null; then
ebegin "Stopping CAPI applications"
- /bin/fuser -ks /dev/capi20; RET=$?
+ fuser -ks /dev/capi20; RET=$?
while [ ${RET} -eq 0 -a ${FCNT} -lt 10 ]; do
- : $((FCNT++)); sleep 0.5; /bin/fuser -s /dev/capi20; RET=$?
+ : $((FCNT++)); sleep 0.5; fuser -s /dev/capi20; RET=$?
done
- [ $RET -ne 0 ]
+ [ ${RET} -ne 0 ]
eend $?
fi
@@ -150,8 +151,10 @@ stop() {
ebegin "Stopping CAPI"
[ "${CAPI_LOAD_CAPIDRV}" = "yes" ] && /sbin/modprobe -sqr capidrv
- [ "${CAPI_UNLOAD_CARDS}" = "yes" ] && /usr/sbin/capiinit &>/dev/null stop
- for DRV in ${DRIVERS}; do /sbin/modprobe -sqr "${DRV}"; done
+ [ "${CAPI_UNLOAD_CARDS}" = "yes" ] && /usr/sbin/capiinit stop &>/dev/null
+ for DRV in ${DRIVERS}; do
+ /sbin/modprobe -sqr "${DRV}"
+ done
/sbin/modprobe -sqr capi
eend 0 # ignore errors
}
@@ -168,10 +171,10 @@ info() {
showconfig() {
local MSG INFO
- if INFO=$(/usr/sbin/capiinit 2>&1 show); then
- while read MSG; do einfo "${MSG}"; done < <(echo "${INFO}")
+ if INFO=$(/usr/sbin/capiinit show 2>&1); then
+ echo "${INFO}" | while read MSG; do einfo "${MSG}"; done
return 0
fi
- while read MSG; do eerror "${MSG}"; done < <(echo "${INFO}")
+ echo "${INFO}" | while read MSG; do eerror "${MSG}"; done
return 1
}