hotplug: call handle_device.d/ actions for remove

* Original actions didn't care about remove (10-span-types, 20-span-assignments)
* But others need to know about removals too.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
Oron Peled 2014-03-09 14:03:00 +02:00 committed by Tzafrir Cohen
parent 066fa2aff3
commit cfee27106b
3 changed files with 16 additions and 1 deletions

View File

@ -77,8 +77,9 @@ add)
run_parts 2>&1 < /dev/null | $LOGGER &
;;
remove)
# Nothing to do yet...
echo "$ACTION: $DEVPATH" | $LOGGER
# Background run -- don't block udev
run_parts 2>&1 < /dev/null | $LOGGER &
;;
*)
echo "UNHANDLED: $ACTION: $DEVPATH" | $LOGGER

View File

@ -1,5 +1,12 @@
#! /bin/sh
case "$ACTION" in
add)
;;
*)
exit 0
esac
if [ -r "$DAHDICONFDIR/span-types.conf" ]; then
dahdi_span_types set "/sys$DEVPATH"
fi

View File

@ -1,5 +1,12 @@
#! /bin/sh
case "$ACTION" in
add)
;;
*)
exit 0
esac
if [ -r "$DAHDICONFDIR/assigned-spans.conf" ]; then
dahdi_span_assignments add "/sys$DEVPATH"
else