Avoid a race between /etc/init.d/dahdi and hotplug scripts:
[dahdi/tools.git] / hotplug / dahdi_auto_assign_compat
index 96f90dd..23fa5a8 100755 (executable)
@@ -22,4 +22,9 @@ devices_by_registration_time | \
        done
 
 # Now handle Astribanks
-LC_ALL=C dahdi_registration -Rv on
+unmatched="`dahdi_span_assignments unmatched`"
+if [ -n "$unmatched" ]; then
+       # Only if astribanks are not matched in span-assignments.conf
+       # TODO: have dahdi_registration run only on "$unmatched"
+       LC_ALL=C dahdi_registration -Rv on
+fi