From 52488d66fa209fef71ae58fb6185e2d855769b04 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 23 Sep 2013 20:43:25 +0300 Subject: [PATCH] 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 --- 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)