[Eisfair] Eisfax vermisst Modem
Andreas Hager
kw06 at firmahager.de
Mi Mär 15 12:45:36 CET 2023
Am 15.03.2023 um 11:52 schrieb Holger Bruenjes:
> Hallo Andreas
>
> Am 15/03/2023 um 09.53 schrieb Andreas Hager:
>> beim Start des eisfax-service scheint das Modem noch nicht soweit zu
>> sein.
>>
>> Ich hatte heute ne Mail:
>
> was fuer einen Treiber sollte geladen weden, bzw, was ist die
> Einstellung in mISDNuser?
>
> Ich habe hier ein USB Modem des funktioniert so
>
> Holger
>
So sieht die Konfig aus:
│ mISDNuser-VERSION 3.2.0
│ START_MISDNUSER = yes
│ Card settings
│ MISDNUSER_AVM_FRITZ = no
│ MISDNUSER_HFC_PCI =
no
│ MISDNUSER_HFC_MULTI
= yes
│ MISDNUSER_HFC_MULTI_OPTION
=
│ MISDNUSER_HFC_USB = no
│ MISDNUSER_INFINEON = no
│ MISDNUSER_DEBUG = yes
oder Dateiinhalt:
#!/bin/sh
#----------------------------------------------------------------------------
# /etc/init.d/misdnuser - Init script for mISDNuser
#
# Creation: 2017-02-12 hbfl
# Last Update: $Id: misdnuser 89797 2021-08-19 22:03:02Z hbfl $
#
# Copyright (c) 2017-2021 Holger Bruenjes, holgerbruenjes(at)gmx(dot)net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#----------------------------------------------------------------------------
NAME=mISDNcapid
DAEMON=/usr/sbin/${NAME}
S_PIDFILE=/run/${NAME}.pid
# read functions
. /etc/init.d/functions
# read parameters
. /etc/config.d/misdnuser
#exec 2> /tmp/capi-trace$$.log
#set -x
capi20_file="/etc/isdn/mcapi20.conf"
#
---------------------------------------------------------------------------
# usage
#
---------------------------------------------------------------------------
usage()
{
cat <<EOF
Usage:
${0}
-q, --quiet suppress all normal output
[start]
[stop]
[status]
[restart]
EOF
}
#
---------------------------------------------------------------------------
# unload module
#
# recursively unload a module and its dependencies, if possible.
# where's modprobe -r when you need it?
# inputs: module to unload.
# returns: the result from
#
---------------------------------------------------------------------------
unload_module()
{
module="${1}"
line=$(/usr/bin/grep "^${module} " /proc/modules)
if [ -z "${line}" ]
then
return
fi # module was not loaded
set -- ${line}
# $1: the original module
# $2: size
# $3: refcount
# $4: deps list
# use newline here to can do 'grep -v' not a space
mods=$(echo ${4} | /usr/bin/tr , '\n')
for mod in ${mods}
do
# run in a subshell, so it won't step over our vars:
(
unload_module ${mod}
)
# TODO: the following is probably the error handling we want:
# if [ $? != 0 ]; then return 1; fi
done
/usr/sbin/modprobe -r ${module} 2>/dev/null
}
#
---------------------------------------------------------------------------
# start misdn
#
---------------------------------------------------------------------------
misdn_start()
{
pidofproc -p ${S_PIDFILE} -s ${DAEMON}
case ${?} in
0)
boot_mesg " * mISDNuser is already running ..."
echo_warning
exit 0
;;
1)
/usr/bin/rm -f ${S_PIDFILE}
;;
esac
boot_mesg " * Starting mISDNuser services ..."
# kernel 5 has droped this modules
/usr/sbin/modprobe capidrv 2>/dev/null
/usr/sbin/modprobe capi 2>/dev/null
misdn_module='AVM_FRITZ:avmfritz
HFC_PCI:hfcpci
HFC_MULTI:hfcmulti
HFC_USB:hfcsusb
INFINEON:mISDNinfineon'
echo "${misdn_module}" |
while read line
do
name=$(echo ${line} | /usr/bin/cut -d ':' -f1)
mod=$(echo ${line} | /usr/bin/cut -d ':' -f2)
eval mod_name='${MISDNUSER_'${name}'}'
if [ "${mod_name}" = "yes" ]
then
eval mod_opt='${MISDNUSER_'${name}'_OPTION}'
/usr/sbin/modprobe "${mod}" ${mod_opt}
fi
done
/usr/bin/mkdir -p /run/mISDNcapid
loadproc ${DAEMON} >/dev/null 2>&1
evaluate_retval
misdn_pid=$(/usr/bin/pidof ${DAEMON})
echo "${misdn_pid}" >${S_PIDFILE}
# start gestoppte dienste
# for old before capi update 1.9.3
if [ -f /tmp/capi_start ]
then
/tmp/capi_start
/usr/bin/rm -f /tmp/capi_start
fi
# start gestoppte dienste
if [ -f /run/capi_start ] ||
[ -f /run/capi_start2 ] ||
[ -f /run/misdn_start ] ||
[ -f /tmp/capi_start2 ]
then
stop_pack="$(/usr/bin/find /etc/capi.d -maxdepth 1 -type f
-name "*" -printf '%f\n')"
if [ -n "${stop_pack}" ]
then
for _pack in ${stop_pack}
do
/etc/init.d/${_pack} start
done
fi
/usr/bin/rm -f /run/capi_start /run/capi_start2
/run/misdn_start /tmp/capi_start2
fi
}
#
---------------------------------------------------------------------------
# stop misdn
#
---------------------------------------------------------------------------
misdn_stop()
{
pidofproc -p ${S_PIDFILE} -s ${DAEMON}
if [ "${?}" -eq "3" -a "$(tty)" = "/dev/console" ]
then
_mesg=false
fi
if pgrep ${NAME} >/dev/null
then
stop_pack="$(/usr/bin/find /etc/capi.d -maxdepth 1 -type f
-name "*" -printf '%f\n' 2>/dev/null)"
if [ -n "${stop_pack}" ]
then
for _pack in ${stop_pack}
do
/etc/init.d/${_pack} stop
done
> /run/capi_start
fi
/usr/bin/sleep 2
if ${_mesg:-true}
then
boot_mesg " * Stopping mISDNuser services..."
fi
killproc ${DAEMON}
rm -f ${S_PIDFILE}
misdn_module='avmfritz
hfcpci
hfcmulti
hfcsusb
mISDNinfineon
capi
capidrv'
for m_modul in ${misdn_module}
do
unload_module ${m_modul}
done
evaluate_retval
fi
}
#
---------------------------------------------------------------------------
# restart misdn
#
---------------------------------------------------------------------------
misdn_restart()
{
misdn_stop
/usr/bin/sleep 5
misdn_start
}
#
---------------------------------------------------------------------------
# status misdn
#
---------------------------------------------------------------------------
misdn_status()
{
statusproc ${DAEMON}
}
#
---------------------------------------------------------------------------
# main
#
---------------------------------------------------------------------------
while [ ${#} -gt 0 ]
do
case "${1}" in
-q|--quiet)
_quiet=true
shift
;;
*)
_action=${1}
shift
;;
esac
done
case "${_action}" in
start)
misdn_start
;;
stop)
misdn_stop
;;
restart)
misdn_restart
;;
status)
misdn_status
;;
*)
usage
exit 1
;;
esac
exit 0
#
---------------------------------------------------------------------------
# end
#
---------------------------------------------------------------------------
Gruß
Andreas
Mehr Informationen über die Mailingliste Eisfair