[asterisk-dev] hotplug DAHDI - dahdi.init
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sun Oct 20 13:19:23 CDT 2013
Hi again,
A folloup to the previous message regarding hotplug DAHDI. This time
regarding the init script.
The DAHDI init script does several actions. As mentioned, I would prefer
to do without it. So let's see what it actually does.
Stop
====
The "stop" action of dahdi.init does just one thing: unloads the DAHDI
kernel modules. dahdi.init includes there a function called
"unload_module" to unload a module after first recursively downloading
all of its dependencies. This is something that should have been done in
C, but is, sadly, still done in shell. It is useful on upgrades (and on
development) to guarantee that the old modules have been unloaded. Maybe
make this a separate script?
Start
=====
This is the bulk of the script.
It does the following:
* Module loading
* xpp_startup
* run dahdi_cfg
* run fxotune
* run xpp_sync
* run hpex_start
Module Loading
--------------
This should probably remain as-is:
* dahdi is not yet loaded so we don't know the value of
dahdi.auto_assign_span.
* If the modules were not yet loaded by hotplugging at the point, it is
probably a good idea to load them manually.
That said, we should, at some point in the future, do away with the
blacklisting of all DAHDI PCI cards modules.
xpp_startup
-----------
Intended to register all Astribanks with DAHDI. Should be skipped in the
case of xpp.dahdi_auto_reg is true.
dahdi_cfg
---------
Should be run after all DAHDI devices have been loaded and configure
them (except dynamic spans, that are reated by running dahdi_cfg).
It should harmless to run it twice, and therefore maybe just lease it as
is. Or only run it in case dahdi.auto_assign_span is not set?
fxotune
-------
fxotune could probably be adapted to run from the udev hook span_config
after running dahdi_cfg for the span. It needs to grow a -C switch the
same as dahdi_cfg (or use channel numbers from -b and -e). In that case
the same comments for dahdi_cfg above would apply.
start_hpec
----------
Is there any problem with moving it as well to span_config? Any problem
with running it twice on a span? On the system?
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com
More information about the asterisk-dev
mailing list