On Thu, 2004-10-21 at 11:37, Alexander Dalloz wrote: > 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 Should we add a touch /var/lock/subsys/capi > ;; > stop) > # Stop. > echo -n "Shutting down capi4linux: " > /sbin/capiinit stop > RETVAL=$? > echo Should we add a rm /var/lock/subsys/capi > ;; > 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 > I am just thinking about how the /etc/rc.d/rc script determines whether to run the K script is based on the existence of the /var/lock/subsys/$subsys file.... Or perhaps the capiinit command does this? Without it, we may not properly shut down the service as the system comes down? --Rob