[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Repacing a driver



Am Do, den 21.10.2004 schrieb Ian Clough um 14:09:

> Where should I start up the new driver and capi. The hisax driver was 
> started by the isdn service - I think.
> The isdn service reads the file isdncard. Do I try to adapt that service or 
> put the new  commands in rc.local
> I am just trying to work out the 'proper' way to do this.
> 
> Ian

Use an init script. Following is the one I am using:

$ cat /etc/rc.d/init.d/capi

#!/bin/sh
#
# capi            Mit diesem Skript kann die AVM-CAPI fuer passive ISDN
#                 Karten gestartet und gestoppt werden.
#
# chkconfig: 2345 32 99
# description: capi4linux ist eine CAPI 2.0 Implementierung von AVM \
# fuer passive ISDN-Karten wie die Fritz!Card Classic
# probe: true
                                                                                                                                             
# Source function library.
. /etc/rc.d/init.d/functions
                                                                                                                                             
[ -f /sbin/capiinit ] || exit 0
                                                                                                                                             
[ -f /etc/capi.conf ] || exit 0
                                                                                                                                             
RETVAL=0
                                                                                                                                             
# Starten oder stoppen?
case "$1" in
  start)
# Start
        echo -n "Starting capi4linux: "
        /sbin/capiinit start
        /sbin/modprobe capidrv
        RETVAL=$?
        echo
        ;;
  stop)
        # Stop.
        echo -n "Shutting down capi4linux: "
        /sbin/capiinit stop
        RETVAL=$?
        echo
        ;;
  status)
        capiinfo
        exit $?
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: capi {start|stop|status|restart}"
        exit 1
esac
                                                                                                                                             
exit $RETVAL

--- script ended above

You need to activate the init script running "chkconfig capi on".
Whether you need the loading of the "capidrv" module depends on what you
want to do with CAPI. If for instance you want to log ISDN traffic like
phone calls using isdnlog, you need that module as the interface between
CAPI and the isdnlog binary.

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 2 (Tettnang) kernel 2.6.8-1.521smp 
Serendipity 17:31:12 up 1 day, 14:10, load average: 0.37, 0.10, 0.05 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]