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@xorcom.com>
This commit is contained in:
Tzafrir Cohen 2013-09-23 20:43:25 +03:00
parent 00af777a97
commit 52488d66fa

View File

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