[Pkg-voip-commits] [dahdi-tools] 111/285: handle_device: don't fail if no config files

tzafrir at debian.org tzafrir at debian.org
Thu Jul 7 19:18:40 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 52488d66fa209fef71ae58fb6185e2d855769b04
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Mon Sep 23 20:43:25 2013 +0300

    handle_device: don't fail if no config files
    
    Allow the udev rule to work well even if there's no span-types.conf
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
---
 handle_device | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/handle_device b/handle_device
index 498ebf0..a25c921 100755
--- a/handle_device
+++ b/handle_device
@@ -49,8 +49,12 @@ add)
 
 	# Don't block udev for too long
 	(
-		span_types set "/sys$DEVPATH"
-		span_assignments add "/sys$DEVPATH"
+		if [ -r "$DAHDICONFDIR/span-types.conf" ]; then
+			span_types set "/sys$DEVPATH"
+		fi
+		if [ -r "$DAHDICONFDIR/pinned-spans.conf" ]; then
+			span_assignments add "/sys$DEVPATH"
+		fi
 	) 2>&1 < /dev/null | $LOGGER &
 	;;
 remove)

-- 
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