ztcfg at asterisk init.d script
Tzafrir Cohen
tzafrir.cohen@xorcom.com
Mon, 21 Feb 2005 05:32:43 +0200
On Thu, Feb 17, 2005 at 11:28:51PM +0100, Kilian Krause wrote:
> Hi Tzafrir,
>
> Am Donnerstag, den 17.02.2005, 13:46 +0200 schrieb Tzafrir Cohen:
> > The current asterisk init.d script suggests that ztcfg could be run from
> > the asterisk init.d script:
> >
> > # Additional commands
> > # put additional commands here like
> > #
> > #rmmod zaphfc
> > #modprobe zaphfc modes=1
> > #/usr/sbin/ztcfg -v >/dev/null
> >
> > Would you consider it surprising if those modules are loaded at asterisk
> > startup?
>
> well, that's a *VERY* crude hack that's for now needed with zaphfc. Long
> term i seek to replace that need to enforce having ztcfg only run *ONCE*
> by making the zaphfc patch work correctly. Just for now it's a somewhat
> more meaningful place to ensure that ztcfg isn't run multiple before
> starting asterisk. For the version to upload i'm also not entirely sure
> if i'd leave this in. I wish Santiago would get back to me to discuss
> the zaphfc issue.
ztcfg is supposed to be run automatically after loading the modules. See
the modules file in the zaptel directory.
FWIW in Rapid we chose to use a separate init.d script for zaptel and
disable the automatic ztcfg as it gets in the way of auto-detection: if
zaptel.conf does not reflect the exact state after the module's load,
ztcfg will fail and the modprobe will return an error status. Quite
confusing.
Is it possible to put something like 'ztcfg || true' or to add a flag to
ztcfg to make it ignore errors and return 0?
--
Tzafrir Cohen icq#16849755 +972-50-7952406
tzafrir.cohen@xorcom.com http://www.xorcom.com