Package: dahdi Version: 1:2.11.1-3 Severity: important
I am trying to set up Asterisk on Debian Buster, and discovered that dahdi_genconf do not work, possibly because 'dahdi_span_assignments list' fail. This is the output when trying to configure dahdi: # dahdi_genconf -vvvvv Default parameters from /etc/dahdi/genconf_parameters Empty configuration -- no spans Generating /etc/dahdi/assigned-spans.conf cut: '/sys/bus/dahdi_devices/devices/pci:0000:01:05.0/spantype': No such file or directory Empty configuration -- no spans Generating /etc/dahdi/system.conf Empty configuration -- no spans Generating /etc/asterisk/dahdi-channels.conf # And this is the output from the failing command: # dahdi_span_assignments list cut: '/sys/bus/dahdi_devices/devices/pci:0000:01:05.0/spantype': No such file or directory # The cause for this message seem to be that 'spantype' is no longer available from the kernel driver. There is a file named 'dahdi_spantype', perhaps it can be used? I tried to modify the scripts to use dahdi_spantype instead, and the error message went away, but still no channels defined. :( This is the patch I applied: --- /usr/sbin/dahdi_span_assignments.orig 2017-10-11 08:13:56.000000000 +0200 +++ /usr/sbin/dahdi_span_assignments 2019-08-24 09:44:46.758596787 +0200 @@ -156,7 +156,7 @@ devpath=`cd "$device" && pwd -P` location='@'`attr_clean "$device/location"` hardware_id=`attr_clean "$device/hardware_id"` - for local_spanno in `cut -d: -f1 "$device/spantype"` + for local_spanno in `cut -d: -f1 "$device/dahdi_spantype"` do span=`grep 2>/dev/null -Hw "$local_spanno" "$device/span-"*"/local_spanno" | \ sed -e 's,/local_spanno:.*,,' -e 's,.*/,,'` @@ -191,7 +191,7 @@ id="$devpath" fi echo "# Device: [$hardware_id] @$location $devpath" - for local_spanno in `cut -d: -f1 "$device/spantype"` + for local_spanno in `cut -d: -f1 "$device/dahdi_spantype"` do span=`grep 2>/dev/null -Hw "$local_spanno" "$device/span-"*"/local_spanno" | \ sed -e 's,/local_spanno:.*,,' -e 's,.*/,,'` --- /usr/sbin/dahdi_span_types.orig 2019-08-24 09:42:29.335112098 +0200 +++ /usr/sbin/dahdi_span_types 2019-08-24 09:42:52.013050012 +0200 @@ -176,7 +176,7 @@ devpath=`cd "$device" && pwd -P` location='@'`attr_clean "$device/location"` hardware_id=`attr_clean "$device/hardware_id"` - cat "$device/spantype" | while read st; do + cat "$device/dahdi_spantype" | while read st; do case "$st" in *:[ETJ]1) printf "%-10s %-20s %-30s %s\n" \ --- /usr/sbin/dahdi_waitfor_span_assignments.orig 2019-08-24 09:44:03.650535925 +0200 +++ /usr/sbin/dahdi_waitfor_span_assignments 2019-08-24 09:44:14.025592490 +0200 @@ -28,7 +28,7 @@ spans_of() { dev="$1" - wc -l < "$dev/spantype" + wc -l < "$dev/dahdi_spantype" } assigned_spans_of() { -- Happy hacking Petter Reinholdtsen