[asterisk-dev] zaptel helper script
Chris Lee
cslee-list at cybericom.co.uk
Sat Oct 28 07:24:43 MST 2006
John Lange wrote:
> On Fri, 2006-10-27 at 22:23 +0200, Tzafrir Cohen wrote:
>>> 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.
>
> Just because there is a script in init.d does not mean you have to
> call it at shutdown.
>
>> There are also other opportunities in which you need to unload
>> them. Are you expected to call '/etc/init.d/zaptel stop' ?
>
> Yes. Why not? I think that is the way most people would expect it to
> work.
>
>> 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.
>
> I think init.d scripts are the right place for it. The scripts are
> distro specific but the distros are typically not so different that
> you can't incorporate a little switch-case logic.
My two cents on this is, include the script, write it well and let us
see if the distros start to use it. If they do then it is a good thing
to have.
Having a script written by the development team that does the things
that need to be done is always useful.
If it consists of functions then it can be imported into the init.d
scripts and used that way by those that want to anyway.
Regards
chris.
More information about the asterisk-dev
mailing list