[Pkg-voip-commits] [dahdi-tools] 131/285: udev scripts now read /etc/dahdi/init.conf
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:18:44 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 10a6622774249c2548a3279c584c792d1d009d4b
Author: Oron Peled <oron.peled at xorcom.com>
Date: Tue Oct 15 20:09:30 2013 +0300
udev scripts now read /etc/dahdi/init.conf
Added two override variables in init.conf:
* DAHDI_UDEV_DISABLE_DEVICES
* DAHDI_UDEV_DISABLE_SPANS
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
---
handle_device | 10 ++++++++++
init.conf.sample | 4 ++++
span_config | 10 ++++++++++
3 files changed, 24 insertions(+)
diff --git a/handle_device b/handle_device
index 4a95b7b..825f1ab 100755
--- a/handle_device
+++ b/handle_device
@@ -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
diff --git a/init.conf.sample b/init.conf.sample
index 58edec5..e431f1a 100644
--- a/init.conf.sample
+++ b/init.conf.sample
@@ -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
diff --git a/span_config b/span_config
index 64a6ede..c2e87cd 100755
--- a/span_config
+++ b/span_config
@@ -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.
--
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