Avoid a race between /etc/init.d/dahdi and hotplug scripts:
authorOron Peled <oron.peled@xorcom.com>
Mon, 28 Aug 2017 18:47:49 +0000 (21:47 +0300)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Thu, 31 Aug 2017 16:00:02 +0000 (19:00 +0300)
commit754d981621557bae4a48e3a7d641ef86f1dffd41
tree66929504c8f34efa65cf526390c521abd17e4ba7
parentdc95a1164ff10d5fcc362e2eaed95d69fb603a5b
Avoid a race between /etc/init.d/dahdi and hotplug scripts:

* On some systems/configurations, dahdi init script may kick in
  during the time that hotplug scripts are configuring spans.

* It may lead to a race since the init script runs "dahdi_auto_assign_compat"
  which calls "dahdi_registration" and that tries to run
  "dahdi_span_assignments auto ..."

* Use the newly-added "dahdi_span_assignments" "unmatched" operation.

* Now the "dahdi_auto_assign_compat" script only runs "dahdi_registration"
  if there are no "unmatched" Astribanks.

* This prevents the race in fully configured systems.
  The race may still exist on partially-configured systems.
hotplug/dahdi_auto_assign_compat