[asterisk-dev] zaptel helper script

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Oct 27 13:23:20 MST 2006


On Fri, Oct 27, 2006 at 02:50:06PM -0500, John Lange wrote:
> On Fri, 2006-10-27 at 19:25 +0200, Tzafrir Cohen wrote:
> > On Fri, Oct 27, 2006 at 11:50:38AM -0500, John Lange wrote:
> > > Putting init.d logic in a binary? Is that what he is saying? That can't
> > > be what he really means since the attached file is a script.
> > 
> > It is. You could have easily checked it.
> > 
> > And yes: after seeing 5 different implementation of wait_for_devzap ,
> > and mostly buggy ones, I would rather that we provide one that works.
> 
> I'm confused. The only file attached to the bug report is a script, not
> a binary.

Bourne shell is far better for those things than C.

> 
> > > In anycase I believe whatever logic is need should be included in the
> > > init.d/zaptel script.
> > 
> > It has been, for a whie. And then I found myself often calling
> > "/etc/init.d/zaptel unload" . But then again, it is not availble on all
> > distributions. Then I started using 'genzaptelconf -u' (which replicates
> > this code).
> 
> You lost me. There is no "unload" in /etc/init.d/zaptel. If there needs
> to be one it could just be an alias of "stop".
> 
> If there is different logic required for "stop" on different
> distributions then it should be incorporated into the script not made
> into a separate file.

I'll take an exception here: I don't think that zaptel modules should
be unloaded on system shutdown. 

There are also other opportunities in which you need to unload them. Are
you expected to call '/etc/init.d/zaptel stop' ?

And if the service is already marked as "stopped"? (this is how the
things are in e.g. Gentoo)

You see, an init.d script is not the right place for it. Not to mention
the fact that init.d script*s* are distro-specific.

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-dev mailing list