[Pkg-voip-commits] [dahdi-tools] 183/285: hotplug: call handle_device.d/ actions for remove
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:18:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch master
in repository dahdi-tools.
commit cfee27106b6594a03153dcbf805433eb9e7bb630
Author: Oron Peled <oron.peled at xorcom.com>
Date: Sun Mar 9 14:03:00 2014 +0200
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 at xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
---
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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git
More information about the Pkg-voip-commits
mailing list