dahdi_cfg's -S (apply only to a specific span) uses the array chan2span
to map channel numbers to span numbers.
The problem is that it assumes that channels first appear in system.conf
immediately after the span line of a specific span. Thus the following
configuration breaks it:
span=1,...
span=2,...
clear=1-2,4-5
dchan=3,6
The best fix for that is to require -C to be used when -S is used (which
is already the case in our udev hooks).
Fixes DAHTOOL-69.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* dahdi_cfg -S <num>: only apply changes to span <num>.
* If span is analog (no 'span=<num>,<channels>,...' statement in
system.conf), we need to set range: -C <channels>
* With the <basechan> and <channels> attributes in sysfs
we easily configure each device on the fly.
Simply run: dahdi_cfg -S <spanno> -C <basechan>+<channels>-1
from udev script
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10306 17933a7a-c749-41c5-a318-cba88f637d49