From cfee27106b6594a03153dcbf805433eb9e7bb630 Mon Sep 17 00:00:00 2001 From: Oron Peled Date: Sun, 9 Mar 2014 14:03:00 +0200 Subject: [PATCH] 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 Acked-by: Russ Meyerriecks --- hotplug/dahdi_handle_device | 3 ++- hotplug/handle_device.d/10-span-types | 7 +++++++ hotplug/handle_device.d/20-span-assignments | 7 +++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hotplug/dahdi_handle_device b/hotplug/dahdi_handle_device index 52ce9c2..30329bd 100755 --- a/hotplug/dahdi_handle_device +++ b/hotplug/dahdi_handle_device @@ -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 diff --git a/hotplug/handle_device.d/10-span-types b/hotplug/handle_device.d/10-span-types index d840c3d..6b78021 100755 --- a/hotplug/handle_device.d/10-span-types +++ b/hotplug/handle_device.d/10-span-types @@ -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 diff --git a/hotplug/handle_device.d/20-span-assignments b/hotplug/handle_device.d/20-span-assignments index f078aca..bfb724b 100755 --- a/hotplug/handle_device.d/20-span-assignments +++ b/hotplug/handle_device.d/20-span-assignments @@ -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