[Pkg-voip-commits] [dahdi-tools] 178/285: hotplug: Do not run auto span configuration if spans are auto assigned.
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:18:52 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 8e2a5def2714ecd421a08c4713191e68173df741
Author: Shaun Ruffell <sruffell at digium.com>
Date: Fri Jan 31 10:31:20 2014 -0600
hotplug: Do not run auto span configuration if spans are auto assigned.
This reapplies the change made in commit (6ed0adc08 "dahdi_span_config: Do not run auto
span configuration if spans are auto assigned.") which appears to have been
accidentally removed in (7f826a7d35 "hotplug modularization: split logic to
scriptlets").
To rationale from commit 6ed0adc08:
I have seen cases were users run:
# modprobe <driver>; dahdi_cfg -c <custom config file>
and the spans end up misconfigured because dahdi_span_assignments ends up
running, via udev, after the user configured the span the way it wanted.
dahdi_span_assignments now looks at auto_assign_spans module parameter on
dahdi.ko, like dahdi_handle_device already does, to determine if legacy or udev
based configuration is being done.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
---
hotplug/dahdi_span_config | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hotplug/dahdi_span_config b/hotplug/dahdi_span_config
index 0f610fb..6ee3cb3 100755
--- a/hotplug/dahdi_span_config
+++ b/hotplug/dahdi_span_config
@@ -26,6 +26,17 @@ set -e
#echo >&2 "$0($ACTION): DEBUG($# args): '$*'"
+# Old driver. These scripts probably won't work anyway.
+if [ ! -f /sys/module/dahdi/parameters/auto_assign_spans ]; then
+ $LOGGER "Old driver (no auto_assign_spans parameter). Skip $DEVPATH"
+ exit 0
+fi
+
+if [ $(cat /sys/module/dahdi/parameters/auto_assign_spans) -eq 1 ]; then
+ $LOGGER "auto_assign_spans=1. Skip $DEVPATH"
+ exit 0
+fi
+
# Do we have a configuration?
if [ -f /etc/dahdi/init.conf ]; then
. /etc/dahdi/init.conf
--
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