[dahdi-commits] dahdi/tools.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Sun Nov 24 08:49:05 CST 2013


branch "master" has been updated
       via  365a12f42a133b4a49dedbfe2812c1affb695a0f (commit)
       via  2a84216fe416edeb0b98cac01c7f8c4227fc6071 (commit)
       via  791a596c07622ae1fc96ff36a0e0941142a9e20e (commit)
       via  d145364c0087c0071e224e41797043d429b60bf7 (commit)
       via  0afba16b2e531fa5e8a90e05df98eea1192b764f (commit)
       via  c163caca008376313f9204a62aedda9c07f707ac (commit)
       via  c9e8ec749958c70eb4101106ba1a49cc9ec806c7 (commit)
       via  1356a55d779b2d08acb7338d0b9f32c13caeb7ec (commit)
       via  10a6622774249c2548a3279c584c792d1d009d4b (commit)
       via  a4217f69778e85d031877946768ac2d376acbf37 (commit)
       via  fb1a2b557277d1515e5fe020c3d2891060452799 (commit)
       via  6d10525863d91335cd09b0400ddfb85433e107ed (commit)
       via  a1d4355c20550a87bd1b468d3b13c9b8c82cb442 (commit)
       via  b303802658ec2eb7825cee18f151573a250d8588 (commit)
      from  8d9a6bdd8097e3545d14827a61a80a6eca4e9330 (commit)

Summary of changes:
 Makefile                                           |   20 +--
 README                                             |   10 ++
 pinned-spans.conf => assigned-spans.conf.sample    |   19 +--
 configure.ac                                       |    9 --
 dahdi.rules                                        |   18 ++-
 doc/fxotune.8                                      |    1 +
 doc/span_assignments.8                             |   18 +--
 fxotune.c                                          |   13 +-
 handle_device                                      |   12 +-
 init.conf.sample                                   |    4 +
 makeopts.in                                        |    2 -
 spantype.conf => span-types.conf.sample            |    3 +-
 span_assignments                                   |   18 +--
 span_config                                        |   17 ++-
 span_types                                         |  130 ++++++++++++++++----
 xpp/Makefile                                       |    4 +
 xpp/dahdi_genconf                                  |    2 +-
 xpp/dahdi_registration                             |   10 +-
 .../Gen/{Pinnedspans.pm => Assignedspans.pm}       |    8 +-
 xpp/xpp.rules                                      |   11 ++
 20 files changed, 237 insertions(+), 92 deletions(-)
 rename pinned-spans.conf => assigned-spans.conf.sample (76%)
 rename spantype.conf => span-types.conf.sample (91%)
 rename xpp/perl_modules/Dahdi/Config/Gen/{Pinnedspans.pm => Assignedspans.pm} (83%)
 create mode 100644 xpp/xpp.rules


- Log -----------------------------------------------------------------
commit 365a12f42a133b4a49dedbfe2812c1affb695a0f
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Fri Oct 18 09:27:30 2013 +0300

    README: include pinned spans config files
    
    Include pinned-spans.conf and span-types.conf in the generated
    README.html. Reformat them to render properly.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/Makefile b/Makefile
index 5bbeba9..bfc87b7 100644
--- a/Makefile
+++ b/Makefile
@@ -192,7 +192,8 @@ genconf_parameters.sample: xpp/genconf_parameters
 	cp $< $@
 
 README.html: README system.conf.asciidoc init.conf.asciidoc tonezones.txt \
-  UPGRADE.txt genconf_parameters.asciidoc
+  UPGRADE.txt genconf_parameters.asciidoc assigned-spans.conf.asciidoc \
+  span-types.conf.asciidoc
 	$(ASCIIDOC) -n -a toc -a toclevels=3 $<
 
 README.Astribank.html: xpp/README.Astribank
diff --git a/README b/README
index 29ef174..d660f34 100644
--- a/README
+++ b/README
@@ -133,6 +133,16 @@ FIXME: still not properly formatted.
 include::genconf_parameters.asciidoc[]
 
 
+Sample assigned-spans.conf
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+include::assigned-spans.conf.asciidoc[]
+
+
+Sample span-types.conf
+~~~~~~~~~~~~~~~~~~~~~~
+include::span-types.conf.asciidoc[]
+
+
 Tonezones
 ~~~~~~~~~
 The file zonedata.c contains the information about the tone zones used

commit 2a84216fe416edeb0b98cac01c7f8c4227fc6071
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Mon Nov 18 11:14:34 2013 -0500

    Terminology rename: "pinned" -> "assigned"
    
    * File names fixed
    * File contents fixed
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/Makefile b/Makefile
index d9f9b1a..5bbeba9 100644
--- a/Makefile
+++ b/Makefile
@@ -105,9 +105,9 @@ ifeq	(1,$(PBX_HDLC))
 endif
 MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
 
-PINNED_DATA_SCRIPTS:=handle_device span_config
-PINNED_UTILS:=span_assignments span_types
-PINNED_CONF:=pinned-spans.conf.sample span-types.conf.sample
+ASSIGNED_DATA_SCRIPTS:=handle_device span_config
+ASSIGNED_UTILS:=span_assignments span_types
+ASSIGNED_CONF:=assigned-spans.conf.sample span-types.conf.sample
 
 TEST_BINS:=patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest dahdi_maint
 # All the man pages. Not just installed ones:
@@ -228,9 +228,9 @@ ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
 	$(INSTALL) -m 644 system.conf.sample $(DESTDIR)$(CONFIG_FILE)
 endif
 	install -d $(DESTDIR)$(DATA_DIR)
-	install $(PINNED_DATA_SCRIPTS) $(DESTDIR)$(DATA_DIR)/
-	install $(PINNED_UTILS) $(DESTDIR)/$(BIN_DIR)/
-	install -m 644 $(PINNED_CONF) $(DESTDIR)/$(CONFIG_DIR)/
+	install $(ASSIGNED_DATA_SCRIPTS) $(DESTDIR)$(DATA_DIR)/
+	install $(ASSIGNED_UTILS) $(DESTDIR)/$(BIN_DIR)/
+	install -m 644 $(ASSIGNED_CONF) $(DESTDIR)/$(CONFIG_DIR)/
 
 install-libs: libs
 	$(INSTALL) -d -m 755 $(DESTDIR)/$(LIB_DIR)
diff --git a/pinned-spans.conf.sample b/assigned-spans.conf.sample
similarity index 97%
rename from pinned-spans.conf.sample
rename to assigned-spans.conf.sample
index 41306d0..6f83aac 100644
--- a/pinned-spans.conf.sample
+++ b/assigned-spans.conf.sample
@@ -1,5 +1,5 @@
 #
-# /etc/dahdi/pinned-spans.conf:
+# /etc/dahdi/assigned-spans.conf:
 #
 # This file assigns span and channel numbers to dahdi devices
 #
diff --git a/doc/span_assignments.8 b/doc/span_assignments.8
index d517a74..e6fbba0 100644
--- a/doc/span_assignments.8
+++ b/doc/span_assignments.8
@@ -26,7 +26,7 @@ order.
 .B span_assignments
 is used to register those spans or to help creating the configuration
 file used in their registration:
-.B /etc/dahdi/pinned-spans.conf .
+.B /etc/dahdi/assigned-spans.conf .
 
 .SH OPTIONS
 
@@ -36,7 +36,7 @@ There are several sub-commands:
 .RS
 Parameters are paths (in SysFS) to DAHDI devices with unregistered
 spans. The command will register with DAHDI according to according to
-configuration in \fBpinned-spans.conf\fR.
+configuration in \fBassigned-spans.conf\fR.
 .RE
 
 .B remove \fIdevpath \fB[\fIdevpath \fB...]
@@ -60,10 +60,10 @@ List all spans in the system.
 .B dumpconfig
 .RS
 List all registered spans in the system in a format fit to be used in
-\fBpinned-spans.conf\fR. Use this to generate a configuration file after
+\fBassigned-spans.conf\fR. Use this to generate a configuration file after
 you have (perhaps manually) registered all existing spans.
 
-.B dahdi_genconf pinnedspans
+.B dahdi_genconf assignedspans
 uses this command internally.
 .RE
 
@@ -102,7 +102,7 @@ Path in SysFS to the device node.
 .RE
 
 .SH CONFIGURATOIN
-.B pinned-spans.conf
+.B assigned-spans.conf
 is a file with lines specifying registration of spans.
 
 Empty lines or lines beginning with '#' are ignored.
@@ -168,13 +168,13 @@ space must be available.
 
 .B DAHDICONFDIR
 .RS
-The directory in which pinned-spans.conf resides. /etc/dahdi if not
+The directory in which assigned-spans.conf resides. /etc/dahdi if not
 overridden from the environment.
 .RE
 
-.B pinned_spans_conf
+.B assigned_spans_conf
 .RS
-The path to pinned-spans.conf resides. /etc/dahdi/pinned-spans.conf if
+The path to assigned-spans.conf resides. /etc/dahdi/assigned-spans.conf if
 not overridden from the environment.
 .RE
 
@@ -187,7 +187,7 @@ environment.
 
 .SH FILES
 
-.B /etc/dahdi/pinned-spans.conf
+.B /etc/dahdi/assigned-spans.conf
 .RS
 The default location for the configuration file.
 .RE
diff --git a/handle_device b/handle_device
index 825f1ab..9079e6e 100755
--- a/handle_device
+++ b/handle_device
@@ -62,7 +62,7 @@ add)
 		if [ -r "$DAHDICONFDIR/span-types.conf" ]; then
 			span_types set "/sys$DEVPATH"
 		fi
-		if [ -r "$DAHDICONFDIR/pinned-spans.conf" ]; then
+		if [ -r "$DAHDICONFDIR/assigned-spans.conf" ]; then
 			span_assignments add "/sys$DEVPATH"
 		else
 			# No configuration. No order guaranteed
diff --git a/span_assignments b/span_assignments
index 96e49cd..86e8658 100755
--- a/span_assignments
+++ b/span_assignments
@@ -6,17 +6,17 @@
 # from the command line to assign/unassign and list
 # current span assignments.
 #
-# It uses a configuration file: $DAHDICONFDIR/pinned-spans.conf
+# It uses a configuration file: $DAHDICONFDIR/assigned-spans.conf
 # (default DAHDICONFDIR=/etc/dahdi)
 #
 # The first argument is an action:
 #   "auto"       - trigger driver auto_assign attribute for given devices
 #		   (no configuration file is used)
 #   "add"        - assign (spans which are not already assigned), according
-#                  to /etc/dahdi/pinned-spans.conf configuration file
+#                  to /etc/dahdi/assigned-spans.conf configuration file
 #   "remove"     - unassign spans which are not already unassigned
 #   "list"       - human-readable list of all spans (with/without assignments)
-#   "dumpconfig" - dump current assignments in a /etc/dahdi/pinned-spans.conf
+#   "dumpconfig" - dump current assignments in a /etc/dahdi/assigned-spans.conf
 #                  compatible format
 #
 # Without further arguments, it operates on all existing spans
@@ -54,7 +54,7 @@
 
 devbase='/sys/bus/dahdi_devices/devices'
 DAHDICONFDIR="${DAHDICONFDIR:-/etc/dahdi}"
-pinned_spans_conf="$DAHDICONFDIR/pinned-spans.conf"
+assigned_spans_conf="$DAHDICONFDIR/assigned-spans.conf"
 SPAN_ASSIGNMENTS_KEY=${SPAN_ASSIGNMENTS_KEY:-hwid}
 dry_run=
 verbose=
@@ -63,7 +63,7 @@ usage() {
 	echo >&2 "Usage: $0 [options] action [devpath ...]"
 	echo >&2 "       action:"
 	echo >&2 "         auto       - trigger driver auto_assign attribute for given devices"
-	echo >&2 "         add        - assign spans, according to /etc/dahdi/pinned-spans.conf"
+	echo >&2 "         add        - assign spans, according to /etc/dahdi/assigned-spans.conf"
 	echo >&2 "         remove     - unassign spans"
 	echo >&2 "         list       - human-readable list of all spans"
 	echo >&2 "         dumpconfig - dump current state as new configuration"
@@ -228,7 +228,7 @@ unassign_all_spans() {
 
 # Allow comments and empty lines in config file
 filter_conf() {
-	sed -e 's/#.*//' -e '/^[ \t]*$/d' "$pinned_spans_conf"
+	sed -e 's/#.*//' -e '/^[ \t]*$/d' "$assigned_spans_conf"
 }
 
 assign_device_spans() {
@@ -289,11 +289,11 @@ match_device() {
 }
 
 assign_devices() {
-	if [ ! -f "$pinned_spans_conf" ]; then
-		echo >&2 "$0: Missing '$pinned_spans_conf'"
+	if [ ! -f "$assigned_spans_conf" ]; then
+		echo >&2 "$0: Missing '$assigned_spans_conf'"
 		exit 1
 	fi
-	echo "using '$pinned_spans_conf'"
+	echo "using '$assigned_spans_conf'"
 	for device in $DEVICES
 	do
 		match_device "$device"
diff --git a/xpp/dahdi_genconf b/xpp/dahdi_genconf
index bf1a3ca..b5f4562 100755
--- a/xpp/dahdi_genconf
+++ b/xpp/dahdi_genconf
@@ -54,7 +54,7 @@ sub generator_list($) {
 		}
 	} else {
 		# No files given. Use the defaults.
-		@genlist = ('spantypes', 'pinnedspans', 'system', 'chandahdi');
+		@genlist = ('spantypes', 'assignedspans', 'system', 'chandahdi');
 		if($gconfig->{'pri_connection_type'} eq 'R2') {
 			push @genlist, 'unicall';
 		}
diff --git a/xpp/dahdi_registration b/xpp/dahdi_registration
index eb1579a..9902de6 100755
--- a/xpp/dahdi_registration
+++ b/xpp/dahdi_registration
@@ -36,9 +36,9 @@ getopts('vRs:', \%opts) || usage;
 
 my $dahdi_autoreg = check_param('/sys/module/xpp/parameters/dahdi_autoreg') eq 'Y';
 my $auto_assign_spans = check_param('/sys/module/dahdi/parameters/auto_assign_spans') eq '1';
-my $pinned_spans_config = $ENV{'PINNED_SPANS_CONF_FILE'} || '/etc/dahdi/pinned-spans.conf';
+my $assigned_spans_config = $ENV{'ASSIGNED_SPANS_CONF_FILE'} || '/etc/dahdi/assigned-spans.conf';
 my $span_types_config = $ENV{'SPAN_TYPES_CONF_FILE'} || '/etc/dahdi/span-types.conf';
-my $have_pinned_spans_config = -f $pinned_spans_config || 0;
+my $have_assigned_spans_config = -f $assigned_spans_config || 0;
 my $have_span_types_config = -f $span_types_config || 0;
 
 my $sorter;
@@ -60,7 +60,7 @@ my $on = shift;
 my $verbose = $opts{'v'};
 my $should_output = 1;
 
-#print "dahdi_autoreg=$dahdi_autoreg auto_assign_spans=$auto_assign_spans have_pinned_spans_config='$have_pinned_spans_config' have_span_types_config='$have_span_types_config'\n";
+#print "dahdi_autoreg=$dahdi_autoreg auto_assign_spans=$auto_assign_spans have_assigned_spans_config='$have_assigned_spans_config' have_span_types_config='$have_span_types_config'\n";
 
 if(defined($on)) {	# Translate to booleans
 	$on = uc($on);
@@ -100,8 +100,8 @@ foreach my $xbus (Dahdi::Xpp::xbuses($sorter)) {
 		}
 		myprintf "%3s ==> %3s\n", state2str($prev), state2str($on);
 	}
-	if (defined($on) && $on && ! $have_pinned_spans_config && ! $auto_assign_spans) {
-		# Emulate /etc/dahdi/pinned-spans.conf:
+	if (defined($on) && $on && ! $have_assigned_spans_config && ! $auto_assign_spans) {
+		# Emulate /etc/dahdi/assigned-spans.conf:
 		#   - We iterate over $xbus according to /etc/dahdi/xpp_order
 		#   - We "auto" assign all spans of current $xbus
 		my $devpath = sprintf "/sys/bus/dahdi_devices/devices/astribanks:xbus-%02d", $xbus->num;
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm b/xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm
similarity index 83%
rename from xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm
rename to xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm
index 67b8547..ee06ca7 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm
@@ -1,4 +1,4 @@
-package Dahdi::Config::Gen::Pinnedspans;
+package Dahdi::Config::Gen::Assignedspans;
 use strict;
 
 use Dahdi::Config::Gen qw(is_true);
@@ -7,7 +7,7 @@ sub new($$$) {
 	my $pack = shift || die;
 	my $gconfig = shift || die;
 	my $genopts = shift || die;
-	my $file = $ENV{PINNED_SPANS_CONF_FILE} || "/etc/dahdi/pinned-spans.conf";
+	my $file = $ENV{ASSIGNED_SPANS_CONF_FILE} || "/etc/dahdi/assigned-spans.conf";
 	my $self = {
 			FILE	=> $file,
 			GCONFIG	=> $gconfig,
@@ -57,7 +57,7 @@ dahdi - Generate configuration for dahdi drivers.
 
 =head1 DESCRIPTION
 
-Generate the F</etc/dahdi/pinned-spans.conf>.
+Generate the F</etc/dahdi/assigned-spans.conf>.
 This is the configuration for span_assignments.
 
-Its location may be overriden via the environment variable F<PINNED_SPANS_CONF_FILE>.
+Its location may be overriden via the environment variable F<ASSIGNED_SPANS_CONF_FILE>.

commit 791a596c07622ae1fc96ff36a0e0941142a9e20e
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Mon Oct 21 18:04:39 2013 +0300

    dahdi.rules: add persistent channel names as well
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/dahdi.rules b/dahdi.rules
index 392a751..e2a629f 100644
--- a/dahdi.rules
+++ b/dahdi.rules
@@ -7,6 +7,10 @@ SUBSYSTEM=="dahdi",		OWNER="asterisk", GROUP="asterisk", MODE="0660"
 # Backward compat names: /dev/dahdi/<channo>
 SUBSYSTEM=="dahdi_channels",	SYMLINK+="dahdi/%m"
 
+# Add persistant names as well
+SUBSYSTEM=="dahdi_channels", SYSFS{hardware_id}!="",	SYMLINK+="dahdi/devices/%s{hardware_id}/%s{local_spanno}/%n"
+SUBSYSTEM=="dahdi_channels", SYSFS{location}!="",	SYMLINK+="dahdi/devices/@%s{location}/%s{local_spanno}/%n"
+
 LABEL="dahdi_add_end"
 
 # hotplug scripts

commit d145364c0087c0071e224e41797043d429b60bf7
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Mon Oct 21 18:03:26 2013 +0300

    dahdi.rules: don't process "add" events unless needed
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/dahdi.rules b/dahdi.rules
index f983705..392a751 100644
--- a/dahdi.rules
+++ b/dahdi.rules
@@ -1,9 +1,14 @@
+
+ACTION!="add",	GOTO="dahdi_add_end"
+
 # DAHDI devices with ownership/permissions for running as non-root
 SUBSYSTEM=="dahdi",		OWNER="asterisk", GROUP="asterisk", MODE="0660"
 
 # Backward compat names: /dev/dahdi/<channo>
 SUBSYSTEM=="dahdi_channels",	SYMLINK+="dahdi/%m"
 
-# hotplug support
+LABEL="dahdi_add_end"
+
+# hotplug scripts
 SUBSYSTEM=="dahdi_devices",	RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/handle_device"
 SUBSYSTEM=="dahdi_spans",	RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/span_config"

commit 0afba16b2e531fa5e8a90e05df98eea1192b764f
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Mon Oct 21 12:06:18 2013 +0200

    hotplug: run fxotune from span_config:
    
    * Use fxotune -b/-e options to run on wanted channel range

diff --git a/span_config b/span_config
index c2e87cd..226a37f 100755
--- a/span_config
+++ b/span_config
@@ -42,7 +42,7 @@ DAHDICONFDIR='/etc/dahdi'
 export DAHDICONFDIR
 
 run_dahdi_cfg() {
-	echo "dahdi_cfg: span $spanno <$basechan-$endchan>"
+	echo "dahdi_cfg: span $spanno <$basechan-$endchan> ($DEVPATH)"
 	dahdi_cfg -c "$cfg_file" -S "$spanno" -C "$basechan-$endchan"
 }
 
@@ -70,6 +70,11 @@ configure_span() {
 		cfg_file='-'
 		DAHDI_CONF_FILE="$cfg_file" dahdi_genconf system | run_dahdi_cfg
 	fi
+	fxotune_cfg='/etc/fxotune.conf'
+	if [ -r "$fxotune_cfg" ]; then
+		echo "fxotune: span $spanno <$basechan-$endchan> ($DEVPATH)"
+		fxotune -s -b "$basechan" -e "$endchan"
+	fi
 
 	# Add to asterisk
 	asterisk -rx "dahdi create channels $basechan $endchan"

commit c163caca008376313f9204a62aedda9c07f707ac
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Mon Oct 21 12:54:58 2013 +0200

    fxotune: Now options '-b/-e' also apply with '-s'
    
    * Now we can limit fxotune "set" mode to specific channel range.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/doc/fxotune.8 b/doc/fxotune.8
index efa94c3..d3257fc 100644
--- a/doc/fxotune.8
+++ b/doc/fxotune.8
@@ -11,6 +11,7 @@ fxotune \- automatically tune DAHDI FXO channels
 \- dump mode
 
 .B fxotune \-s
+.I [ options ]
 \- Startup mode
 .SH
 .SH DESCRIPTION
diff --git a/fxotune.c b/fxotune.c
index 530ba21..865dc70 100644
--- a/fxotune.c
+++ b/fxotune.c
@@ -980,7 +980,7 @@ static int channel_open(int channo)
  * 
  * @return 0 if successful, !0 otherwise
  */	
-static int do_set(char *configfilename)
+static int do_set(char *configfilename, int dev_range, int startdev, int stopdev)
 {
 	FILE *fp = NULL;
 	int res = 0;
@@ -1007,6 +1007,8 @@ static int do_set(char *configfilename)
 		if (res == EOF) {
 			break;
 		}
+		if (dev_range && (mydahdi < startdev || mydahdi > stopdev))
+			continue;
 
 		/* Check to be sure conversion is done correctly */
 		if (OUT_OF_BOUNDS(myacim) || OUT_OF_BOUNDS(mycoef1)||
@@ -1028,6 +1030,8 @@ static int do_set(char *configfilename)
 		mycoefs.coef7 = mycoef7;
 		mycoefs.coef8 = mycoef8;
 	
+		if (debug >= 2)
+			printf("fxotune: set channel %d\n", mydahdi);
 		fd = channel_open(mydahdi);
 		if (fd < 0) {
 			return -1;
@@ -1187,6 +1191,7 @@ int main(int argc , char **argv)
 {
 	int startdev = 1; /* -b */
 	int stopdev = 252; /* -e */
+	int dev_range = 0; /* false */
 	int calibtype = 2; /* -t */
 	int waveformtype = -1; /* -w multi-tone by default.  If > 0, single tone of specified frequency */
 	int delaytosilence = 0; /* -l */
@@ -1228,9 +1233,11 @@ int main(int argc , char **argv)
 				continue;
 			case 'b':
 				startdev = moreargs ? atoi(argv[++i]) : startdev;
+				dev_range = 1;
 				break;
 			case 'e':
 				stopdev = moreargs ? atoi(argv[++i]) : stopdev;
+				dev_range = 1;
 				break;
 			case 't':
 				calibtype = moreargs ? atoi(argv[++i]) : calibtype;
@@ -1300,13 +1307,13 @@ int main(int argc , char **argv)
 	if (docalibrate){
 		res = do_calibrate(startdev, stopdev, calibtype, configfile, dialstr, delaytosilence, silencegoodfor);
 		if (!res)
-			return do_set(configfile);	
+			return do_set(configfile, dev_range, startdev, stopdev);
 		else
 			return -1;
 	}
 
 	if (doset)
-		return do_set(configfile);
+		return do_set(configfile, dev_range, startdev, stopdev);
 				
 	if (dodump){
 		res = do_dump(startdev, dialstr, delaytosilence, silencegoodfor, waveformtype);

commit c9e8ec749958c70eb4101106ba1a49cc9ec806c7
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Mon Oct 21 18:02:04 2013 +0300

    dahdi.rules: use tools_rootdir from driver
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/dahdi.rules b/dahdi.rules
index b0e1e00..f983705 100644
--- a/dahdi.rules
+++ b/dahdi.rules
@@ -5,5 +5,5 @@ SUBSYSTEM=="dahdi",		OWNER="asterisk", GROUP="asterisk", MODE="0660"
 SUBSYSTEM=="dahdi_channels",	SYMLINK+="dahdi/%m"
 
 # hotplug support
-SUBSYSTEM=="dahdi_devices",	RUN="/usr/share/dahdi/handle_device"
-SUBSYSTEM=="dahdi_spans",	RUN="/usr/share/dahdi/span_config"
+SUBSYSTEM=="dahdi_devices",	RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/handle_device"
+SUBSYSTEM=="dahdi_spans",	RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/span_config"

commit 1356a55d779b2d08acb7338d0b9f32c13caeb7ec
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Mon Nov 4 10:25:25 2013 -0500

    span_types: fix for white-space in hardware_id
    
    * Sanitize hardware_id/location attributes, just like span_assignments
    * Allow control of keys via SPAN_ASSIGNMENTS_KEY or '-k <key>' option
    * In general, import most features/options from span_assignments
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/span_types b/span_types
index 74d18f1..474c74c 100755
--- a/span_types
+++ b/span_types
@@ -8,38 +8,109 @@
 #
 # Span types can be set only *BEFORE* span are assigned.
 #
-# It reads a configuration file /etc/dahdi/span-types.conf
+# It uses a configuration file: $DAHDICONFDIR/span-types.conf
+# (default DAHDICONFDIR=/etc/dahdi)
 # (the format is documented inside that file)
 #
-# A mandatory first argument is:
-#   list       - to show existing E1/T1/J1 types
-#   dumpconfig - the same, but in a format (almost) suitable
-#                for the configuration file
-#   set        - actually write the setting to the driver
+# The first argument is an action:
+#   "set"        - actually write the setting to the driver
+#   "list"       - human-readable list of E1/T1/J1 types
+#   "dumpconfig" - dump current assignments in a /etc/dahdi/span-types.conf
+#                  compatible format
+#
+# Without further arguments, it operates on all existing spans
+# With one or more sysfs dahdi_devices it is limited to those.
+#
+# We may use alternative "keys" for device matching:
+# * Available keys:
+#   - "hwid"       - Hardware id attribute from sysfs
+#   - "@location"  - Location attribute from sysfs (embeded inside '<>')
+#   - "/devpath"   - The sysfs absolute devpath
+#
+# * During "dumpconfig", for each device we take the first available key:
+#   - The preference is: "hwid" or else "@location" or else "/devpath"
+#   - This can be overriden via the SPAN_ASSIGNMENTS_KEY environment variable
+#     or the '{-k|--key} key' command line option.
+#
+# Command line options:
+#  - The '-h|--help' show a usage message.
+#  - The '-k <key>|--key <key>' overrides the SPAN_ASSIGNMENTS_KEY environment
+#    variable.
 #
 # Examples:
 #    span_types list
-#    span_types dumpconfig
 #    span_types set	     # all devices
 #    span_types set /sys/bus/dahdi_devices/devices/astribanks:xbus-00
+#    span_types -k location dumpconfig
 #
 
 
 devbase='/sys/bus/dahdi_devices/devices'
 DAHDICONFDIR="${DAHDICONFDIR:-/etc/dahdi}"
 spantypes_conf="$DAHDICONFDIR/span-types.conf"
+SPAN_ASSIGNMENTS_KEY=${SPAN_ASSIGNMENTS_KEY:-hwid}
 
 usage() {
-	echo >&2 "Usage: $0 {list|dumpconfig|set} [devpath ...]"
+	echo >&2 "Usage: $0 [options] action [devpath ...]"
+	echo >&2 "       action:"
+	echo >&2 "         set        - set spans to E1/T1 according to configuration"
+	echo >&2 "         list       - human-readable list of all spans"
+	echo >&2 "         dumpconfig - dump current state as new configuration"
+	echo >&2 ""
+	echo >&2 "       options:"
+	echo >&2 "         -h|--help      - Show this help"
+	echo >&2 "         -k|--key <k>   - Override prefered key during dumpconfig action"
 	exit 1
 }
 
+# Parse command line options
+TEMP=`getopt -o hk: --long help,key: -n "$0" -- "$@"`
+if [ $? != 0 ]; then
+	echo >&2 "Bad options"
+	usage
+fi
+
+# Note the quotes around `$TEMP': they are essential!
+eval set -- "$TEMP"
+
+while true ; do
+	case "$1" in
+	-h|--help)
+		usage
+		;;
+	-k|--key)
+		SPAN_ASSIGNMENTS_KEY="$2"
+		shift
+		shift
+		;;
+	--)
+		shift
+		break
+		;;
+	*)
+		echo "Internal error!"
+		exit 1
+		;;
+	esac
+done
+
 if [ "$#" -eq 0 ]; then
+	echo >&2 "Missing action argument"
 	usage
 fi
 action="$1"
 shift
 
+# Validate SPAN_ASSIGNMENTS_KEY
+case "$SPAN_ASSIGNMENTS_KEY" in
+hwid|location|devpath)
+	;;
+*)
+	echo >&2 "Bad SPAN_ASSIGNMENTS_KEY='$SPAN_ASSIGNMENTS_KEY' (should be: hwid|location|devpath)"
+	usage
+	;;
+esac
+
 if [ ! -d "$devbase" ]; then
 	echo >&2 "$0: Missing '$devbase' (DAHDI driver unloaded?)"
 	exit 1
@@ -52,17 +123,23 @@ else
 	DEVICES=`echo $devbase/*`
 fi
 
+# Beware of special characters in attributes
+attr_clean() {
+	cat "$1" | tr -d '\n' | tr '!' '/' | tr -c 'a-zA-Z0-9/:.-' '_'
+}
+
 show_spantypes() {
 	echo "# PRI span types (E1/T1/J1)"
 	for device in $DEVICES
 	do
-		hw_id=`cat "$device/hardware_id"`
-		location='@'`cd "$device" && pwd -P | sed 's,/sys/devices/,,'`
+		devpath=`cd "$device" && pwd -P`
+		location='@'`attr_clean "$device/location"`
+		hardware_id=`attr_clean "$device/hardware_id"`
 		cat "$device/spantype" | while read st; do
 			case "$st" in
 			*:[ETJ]1)
 				printf "%-10s %-20s %s\n" \
-					"$st" "[$hw_id]" "$location"
+					"$st" "[$hardware_id]" "$location"
 				;;
 			esac
 		done | sort -n
@@ -78,14 +155,17 @@ dump_config() {
 	printf "$fmt" '# @location/hardware_id' 'span_type'
 	for device in $DEVICES
 	do
-		hw_id=`cat "$device/hardware_id"`
-		location='@'`cd "$device" && pwd -P | sed 's,/sys/devices/,,'`
-		if [ -n "$hw_id" ]; then
-			id="$hw_id"
+		devpath=`cd "$device" && pwd -P`
+		location=`attr_clean "$device/location"`
+		hardware_id=`attr_clean "$device/hardware_id"`
+		if [ "$SPAN_ASSIGNMENTS_KEY" = 'hwid' -a "$hardware_id" != '' ]; then
+			id="$hardware_id"
+		elif [ "$SPAN_ASSIGNMENTS_KEY" = 'location' -a "$location" != '' ]; then
+			id="@$location"
 		else
-			id="$location"
+			id="$devpath"
 		fi
-		#echo "# Device: [$hw_id] $location"
+		echo "# Device: [$hardware_id] @$location $devpath"
 		cat "$device/spantype" | while read st; do
 			case "$st" in
 			*:[ETJ]1)
@@ -106,7 +186,7 @@ filter_conf() {
 }
 
 conf_spans() {
-	hw_id="$1"
+	hardware_id="$1"
 	location="$2"
 	filter_conf | (
 		# Collect device spans
@@ -120,7 +200,7 @@ conf_spans() {
 				SPANS="$SPANS $spans"
 				;;
 			esac
-			case "$hw_id" in
+			case "$hardware_id" in
 			$id)
 				#echo >&2 "match([$id]): $spans"
 				SPANS="$SPANS $spans"
@@ -131,17 +211,13 @@ conf_spans() {
 	)
 }
 
-# Beware of special characters in attributes
-attr_clean() {
-	cat "$1" | tr -d '\n' | tr '!' '/' | tr -c 'a-zA-Z0-9/:.-' '_'
-}
-
 device_set_spantype() {
 	device="$1"
 	attr_file="$device/spantype"
-	hw_id=`attr_clean "$device/hardware_id"`
-	location='@'`cd "$device" && pwd -P | sed 's,/sys/devices/,,'`
-	spanspecs=`conf_spans "$hw_id" "$location"`
+	devpath=`cd "$device" && pwd -P`
+	location='@'`attr_clean "$device/location"`
+	hardware_id=`attr_clean "$device/hardware_id"`
+	spanspecs=`conf_spans "$hardware_id" "$location"`
 	#echo >&2 "MATCHED($device): $spanspecs"
 	cut -d: -f1 "$attr_file" | while read spanno; do
 			for sp in $spanspecs

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>

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.

commit a4217f69778e85d031877946768ac2d376acbf37
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Tue Oct 15 21:01:01 2013 +0300

    sysfs: restored legacy names /etc/dahdi/<channo>:
    
    Update dahdi.rules to create again the old fashioned device files
    (/dev/dahdi/<channo>), but as symlinks to modern names.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/dahdi.rules b/dahdi.rules
index 8674cd1..b0e1e00 100644
--- a/dahdi.rules
+++ b/dahdi.rules
@@ -1,4 +1,9 @@
 # DAHDI devices with ownership/permissions for running as non-root
 SUBSYSTEM=="dahdi",		OWNER="asterisk", GROUP="asterisk", MODE="0660"
+
+# Backward compat names: /dev/dahdi/<channo>
+SUBSYSTEM=="dahdi_channels",	SYMLINK+="dahdi/%m"
+
+# hotplug support
 SUBSYSTEM=="dahdi_devices",	RUN="/usr/share/dahdi/handle_device"
 SUBSYSTEM=="dahdi_spans",	RUN="/usr/share/dahdi/span_config"

commit fb1a2b557277d1515e5fe020c3d2891060452799
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Tue Oct 15 21:00:17 2013 +0300

    added udev rules and their install target:
    
    * Added missing Makefile install rule for dahdi.rules
    * Pulled xpp.rules from dahdi-linux and added install rules for it
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/Makefile b/Makefile
index cbd44a2..d9f9b1a 100644
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,7 @@ MAN_DIR:=$(mandir)/man8
 DATA_DIR:=${datadir}/dahdi
 CONFIG_DIR:=$(sysconfdir)/dahdi
 CONFIG_FILE:=$(CONFIG_DIR)/system.conf
+UDEVRULES_DIR:=$(sysconfdir)/udev/rules.d
 
 # Utilities we build with a standard build procedure:
 UTILS		= dahdi_tool dahdi_test dahdi_monitor dahdi_speed sethdlc dahdi_cfg \
@@ -292,6 +293,8 @@ endif
 ifeq (,$(wildcard $(DESTDIR)$(BLACKLIST_FILE)))
 	$(INSTALL) -D -m 644 blacklist.sample $(DESTDIR)$(BLACKLIST_FILE)
 endif
+	$(INSTALL) -d $(DESTDIR)$(UDEVRULES_DIR)
+	$(INSTALL) -D -m 644 dahdi.rules $(DESTDIR)$(UDEVRULES_DIR)/
 ifneq (,$(COPY_NETSCR))
 	$(COPY_NETSCR)
 endif
diff --git a/xpp/Makefile b/xpp/Makefile
index 8cbfae9..49f7b33 100644
--- a/xpp/Makefile
+++ b/xpp/Makefile
@@ -20,6 +20,8 @@ INSTALL_DATA	= $(INSTALL) -m 644
 prefix		?= /usr
 datadir		?= $(prefix)/share
 mandir		?= $(datadir)/man
+sysconfdir	?= $(prefix)/etc
+udevrulesdir	?= $(sysconfdir)/udev/rules.d
 INSTALL		?= install
 
 INSTALL_DATA	= $(INSTALL) -m 644
@@ -102,6 +104,8 @@ install: all
 	$(INSTALL) -d $(DESTDIR)$(DATADIR)
 	$(INSTALL) xpp_fxloader astribank_hook $(DESTDIR)$(DATADIR)/
 	$(INSTALL) waitfor_xpds $(DESTDIR)$(DATADIR)/
+	$(INSTALL) -d $(DESTDIR)$(udevrulesdir)
+	$(INSTALL_DATA) xpp.rules $(DESTDIR)$(udevrulesdir)/
 	$(INSTALL) -d $(DESTDIR)$(MANDIR)
 	$(INSTALL_DATA) $(MAN_INSTALL) $(DESTDIR)$(MANDIR)/
 	$(INSTALL) -d $(DESTDIR)$(HOTPLUG_USB_DIR)
diff --git a/xpp/xpp.rules b/xpp/xpp.rules
new file mode 100644
index 0000000..93f772d
--- /dev/null
+++ b/xpp/xpp.rules
@@ -0,0 +1,11 @@
+# Load firmware into the Xorcom Astribank device:
+SUBSYSTEM=="usb", ACTION=="add", \
+ENV{PRODUCT}=="e4e4/11[3456][013]/*", ENV{DEVTYPE}!="usb_interface", \
+	RUN+="/usr/share/dahdi/xpp_fxloader udev $env{PRODUCT}"
+
+# Hotplug hook for Astribank up/down
+# If you need this functionality, copy the astribank_hook.sample
+# to $XPP_INIT_DIR/astribank_hook
+#
+# By default XPP_INIT_DIR="/usr/share/dahdi"
+KERNEL=="xbus*", RUN+="%E{XPP_INIT_DIR}/astribank_hook udev $kernel $sysfs{status} $sysfs{connector}"

commit 6d10525863d91335cd09b0400ddfb85433e107ed
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Tue Oct 15 17:45:38 2013 +0300

    pinned-spans: remove '--enable-pinned' from configure
    
    pinned-spans utilities are now essential:
    * Called by udev rules
    * Called by dahdi_genconf
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/Makefile b/Makefile
index c75f967..cbd44a2 100644
--- a/Makefile
+++ b/Makefile
@@ -226,12 +226,10 @@ ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
 	$(INSTALL) -d $(DESTDIR)$(CONFIG_DIR)
 	$(INSTALL) -m 644 system.conf.sample $(DESTDIR)$(CONFIG_FILE)
 endif
-ifeq ($(DAHDI_PINNED),yes)
 	install -d $(DESTDIR)$(DATA_DIR)
 	install $(PINNED_DATA_SCRIPTS) $(DESTDIR)$(DATA_DIR)/
 	install $(PINNED_UTILS) $(DESTDIR)/$(BIN_DIR)/
 	install -m 644 $(PINNED_CONF) $(DESTDIR)/$(CONFIG_DIR)/
-endif
 
 install-libs: libs
 	$(INSTALL) -d -m 755 $(DESTDIR)/$(LIB_DIR)
diff --git a/configure.ac b/configure.ac
index d970365..4fa396b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,15 +79,6 @@ AC_ARG_ENABLE(dev-mode,
 	esac])
 AC_SUBST(DAHDI_DEVMODE)
 
-AC_ARG_ENABLE(pinned,
-	[  --enable-pinned    Install pinned-spans support],
-	[case "${enableval}" in
-	      y|ye|yes) DAHDI_PINNED=yes ;;
-	      n|no)  DAHDI_PINNED=no ;;
-	      *) AC_MSG_ERROR(bad value ${enableval} for --enable-pinned)  ;;
-	esac])
-AC_SUBST(DAHDI_PINNED)
-
 AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
 if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
 	AC_MSG_RESULT(yes)
diff --git a/makeopts.in b/makeopts.in
index ebda941..a892a76 100644
--- a/makeopts.in
+++ b/makeopts.in
@@ -30,8 +30,6 @@ DOWNLOAD=@DOWNLOAD@
 DAHDI_DEVMODE=@DAHDI_DEVMODE@
 DAHDI_DECLARATION_AFTER_STATEMENT=@DAHDI_DECLARATION_AFTER_STATEMENT@
 
-DAHDI_PINNED=@DAHDI_PINNED@
-
 PBX_NEWT=@PBX_NEWT@
 NEWT_LIB=@NEWT_LIB@
 NEWT_INCLUDE=@NEWT_INCLUDE@

commit a1d4355c20550a87bd1b468d3b13c9b8c82cb442
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Tue Oct 15 20:56:31 2013 +0300

    pinned-spans: fix examples in configuration files
    
    * Correctly use the new "location" attribute
    * Document the possibility to match against sysfs devpath
      (used to be the "location")
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/pinned-spans.conf.sample b/pinned-spans.conf.sample
index a9145bb..41306d0 100644
--- a/pinned-spans.conf.sample
+++ b/pinned-spans.conf.sample
@@ -10,6 +10,7 @@
 #  * The <id> field may be either:
 #         hardware_id
 #         @location
+#         devpath (in sysfs)
 #  * Shell-style globbing is allowed for the <id> field
 #  * There may one or more of <spanspec>
 #  * Each <spanspec> is composed as:
@@ -44,13 +45,13 @@
 # Astribank with 4*BRI without hardware_id :-(
 # We use the location on the bus (ie: where it is physically
 # located). Note the '@' prefix that indicate the location key.
-#@pci0000:00/0000:00:03.3/usb1/1-6/xbus-01/astribanks:xbus-01	1:1:50
-#@pci0000:00/0000:00:03.3/usb1/1-6/xbus-01/astribanks:xbus-01	2:2:100
-#@pci0000:00/0000:00:03.3/usb1/1-6/xbus-01/astribanks:xbus-01	3:3:150
-#@pci0000:00/0000:00:03.3/usb1/1-6/xbus-01/astribanks:xbus-01	4:4:200
+#@usb-0000:00:1d.7-3	1:1:50
+#@usb-0000:00:1d.7-3	2:2:100
+#@usb-0000:00:1d.7-3	3:3:150
+#@usb-0000:00:1d.7-3	4:4:200
 
 # Same configuration with globbing:
-#@*/usb1/1-6/*	1:1:50
-#@*/usb1/1-6/*	2:2:100
-#@*/usb1/1-6/*	3:3:150
-#@*/usb1/1-6/*	4:4:200
+#/sys/*/usb1/1-6/*	1:1:50
+#/sys/*/usb1/1-6/*	2:2:100
+#/sys/*/usb1/1-6/*	3:3:150
+#/sys/*/usb1/1-6/*	4:4:200
diff --git a/span-types.conf.sample b/span-types.conf.sample
index e639fe5..71c391e 100644
--- a/span-types.conf.sample
+++ b/span-types.conf.sample
@@ -8,6 +8,7 @@
 #  * The <id> field may be either:
 #         hardware_id
 #         @location
+#         devpath (in sysfs)
 #  * The <local_spanno> is the relative span number 
 #    in the device (starting from 1)
 #    In this filed globbing rules apply. E.g:
@@ -24,4 +25,4 @@
 
 #  Set the first two spans of an Astribank to T1. The
 #  Astribanks is specified by its location instead of hardware_id
-#@pci0000:00/0000:00:03.3/usb1/1-5/xbus-01/astribanks:xbus-01 [12]:T1
+#@usb-0000:00:1d.7-3 [12]:T1

commit b303802658ec2eb7825cee18f151573a250d8588
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Tue Oct 15 20:54:54 2013 +0300

    pinned-spans: fix configuration file names
    
    * Install them as *.conf.sample -- that's what they are
    * Correctly rename spantype.conf to span-types.conf (new name)
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/Makefile b/Makefile
index b24f6ef..c75f967 100644
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,7 @@ MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
 
 PINNED_DATA_SCRIPTS:=handle_device span_config
 PINNED_UTILS:=span_assignments span_types
-PINNED_CONF:=pinned-spans.conf spantype.conf
+PINNED_CONF:=pinned-spans.conf.sample span-types.conf.sample
 
 TEST_BINS:=patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest dahdi_maint
 # All the man pages. Not just installed ones:
diff --git a/pinned-spans.conf b/pinned-spans.conf.sample
similarity index 100%
rename from pinned-spans.conf
rename to pinned-spans.conf.sample
diff --git a/spantype.conf b/span-types.conf.sample
similarity index 100%
rename from spantype.conf
rename to span-types.conf.sample

-----------------------------------------------------------------------


-- 
dahdi/tools.git



More information about the dahdi-commits mailing list