udev scripts now read /etc/dahdi/init.conf
authorOron Peled <oron.peled@xorcom.com>
Tue, 15 Oct 2013 17:09:30 +0000 (20:09 +0300)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Sun, 24 Nov 2013 14:20:08 +0000 (16:20 +0200)
Added two override variables in init.conf:
* DAHDI_UDEV_DISABLE_DEVICES
* DAHDI_UDEV_DISABLE_SPANS

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

handle_device
init.conf.sample
span_config

index 4a95b7b..825f1ab 100755 (executable)
@@ -25,6 +25,16 @@ set -e
 
 #echo >&2 "$0($ACTION): DEBUG($# args): '$*'"
 
+# Do we have a configuration?
+if [ -f /etc/dahdi/init.conf ]; then
+       . /etc/dahdi/init.conf
+fi
+
+if [ "$DAHDI_UDEV_DISABLE_DEVICES" = 'yes' ]; then
+       echo "DAHDI_UDEV_DISABLE_DEVICES=yes. Skip $DEVPATH" | $LOGGER
+       exit 0
+fi
+
 # Check if we can safely do our job
 if [ ! -f /sys/module/dahdi/parameters/auto_assign_spans ]; then
        echo "Old driver (no auto_assign_spans parameter). Skip $DEVPATH" | $LOGGER
index 58edec5..e431f1a 100644 (file)
@@ -17,3 +17,7 @@
 #XPP_FIRMWARE_DIR=/usr/share/dahdi
 #XPP_HOTPLUG_DISABLED=yes
 #XPP_HOTPLUG_DAHDI=yes
+
+# Disable udev handling:
+#DAHDI_UDEV_DISABLE_DEVICES=yes
+#DAHDI_UDEV_DISABLE_SPANS=yes
index 64a6ede..c2e87cd 100755 (executable)
@@ -25,6 +25,16 @@ set -e
 
 #echo >&2 "$0($ACTION): DEBUG($# args): '$*'"
 
+# Do we have a configuration?
+if [ -f /etc/dahdi/init.conf ]; then
+       . /etc/dahdi/init.conf
+fi
+
+if [ "$DAHDI_UDEV_DISABLE_SPANS" = 'yes' ]; then
+       echo "DAHDI_UDEV_DISABLE_SPANS=yes. Skip $DEVPATH" | $LOGGER
+       exit 0
+fi
+
 # Can we pass a different value so we can use
 # alternate (testing) configuration?
 # Meanwhile, make it hard-coded.