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

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Mon Jan 20 11:24:27 CST 2014


branch "master" has been updated
       via  a4f79134c959830bfcb869068cd1cf4891f00527 (commit)
       via  d8074f434f550f00a1e484d413309ac32b466883 (commit)
       via  15875924f096411eaaad751613dfe658be1e76ca (commit)
       via  a5bf1d3a2e93be03f6cf66b76cb23b4a98521671 (commit)
       via  bf960799ea0bda868efbd82641efd9842e1c8499 (commit)
      from  4f259cd569f6e6bd2b482c5419b933556ff59193 (commit)

Summary of changes:
 dahdi_handle_device    |    2 +-
 dahdi_span_assignments |    2 +-
 dahdi_span_types       |    6 +++---
 xpp/dahdi_genconf      |    6 ++++--
 4 files changed, 9 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit a4f79134c959830bfcb869068cd1cf4891f00527
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Wed Jan 8 18:14:05 2014 -0600

    dahdi_handle_device: Auto assign only the device being added.
    
    Eliminates trying to add spans multiple times as seen below:
    
        'dahdi_handle_device'[21993]: add: /devices/dynamic:loc:1
        'dahdi_handle_device'[21991]: add: /devices/dynamic:loc:0
        'dahdi_handle_device'[22001]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:0
        'dahdi_handle_device'[22001]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:1
        'dahdi_handle_device'[21999]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:0
        'dahdi_handle_device'[21999]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:1
        kernel: [ 3348.312534] dahdi_devices dynamic:loc:0: local span 1 is already assigned span 1
        kernel: [ 3348.312552] dahdi_devices dynamic:loc:1: local span 1 is already assigned span 2
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/dahdi_handle_device b/dahdi_handle_device
index d475511..34af0c3 100755
--- a/dahdi_handle_device
+++ b/dahdi_handle_device
@@ -69,7 +69,7 @@ add)
 			dahdi_span_assignments add "/sys$DEVPATH"
 		else
 			# No configuration. No order guaranteed
-			dahdi_span_assignments auto
+			dahdi_span_assignments auto "/sys$DEVPATH"
 		fi
 	) 2>&1 < /dev/null | $LOGGER &
 	;;

commit d8074f434f550f00a1e484d413309ac32b466883
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Wed Jan 8 18:14:04 2014 -0600

    dahdi_span_types: Show location of configuration file in help message.
    
    Makes similar in for the dahdi_span_assignments in that the location of the
    default configuration file is shown in the help screen.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/dahdi_span_types b/dahdi_span_types
index b12fc6f..7936076 100755
--- a/dahdi_span_types
+++ b/dahdi_span_types
@@ -53,9 +53,9 @@ SPAN_ASSIGNMENTS_KEY=${SPAN_ASSIGNMENTS_KEY:-hwid}
 usage() {
 	echo >&2 "Usage: $0 [options] action [devpath ...]"
 	echo >&2 "       action:"
-	echo >&2 "         set        - set spans to E1/T1 according to configuration"
+	echo >&2 "         set        - set spans to E1/T1 according to /etc/dahdi/span-types.conf"
 	echo >&2 "         list       - human-readable list of all spans"
-	echo >&2 "         dumpconfig - dump current state as new configuration"
+	echo >&2 "         dumpconfig - dump current state in /etc/dahdi/span-types.conf format"
 	echo >&2 ""
 	echo >&2 "       options:"
 	echo >&2 "         -h|--help      - Show this help"

commit 15875924f096411eaaad751613dfe658be1e76ca
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Wed Jan 8 18:14:03 2014 -0600

    dahdi_genconf: Add 'modules', 'spantypes', and 'assignedspans' to list of available generators.
    
    This is a documentation change, that hopefully will help until I can remember
    the names of the new generators.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/xpp/dahdi_genconf b/xpp/dahdi_genconf
index 891edf8..a4acfa8 100755
--- a/xpp/dahdi_genconf
+++ b/xpp/dahdi_genconf
@@ -141,7 +141,9 @@ as specified by the generator arguments.  Each generator is a perl class
 in Dahdi::Config::Gen namespace.  The generator names on the command line
 are the class names in lowercase.
 
-The following generators are currently implemented: system, chandahdi, unicall, users.
+The following generators are currently implemented: system, modules, spantypes,
+assignedspans, chandahdi, unicall, users.
+
 For further documentation on each, please user perldoc on the relevant
 class. E.g: C<perldoc Dahdi::Config::Gen::Chandahdi>
 

commit a5bf1d3a2e93be03f6cf66b76cb23b4a98521671
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Mon Jan 20 15:23:43 2014 +0200

    dahdi_genconf: don't generate spantypes by default
    
    A sane value for span-types.conf is either "all E1" or "all T1". Either
    way it is not hardware-dependent, and hence no point in regenerating on
    when the hardware changes.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/xpp/dahdi_genconf b/xpp/dahdi_genconf
index b5f4562..891edf8 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', 'assignedspans', 'system', 'chandahdi');
+		@genlist = ('assignedspans', 'system', 'chandahdi');
 		if($gconfig->{'pri_connection_type'} eq 'R2') {
 			push @genlist, 'unicall';
 		}

commit bf960799ea0bda868efbd82641efd9842e1c8499
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Thu Jan 2 11:14:38 2014 +0200

    span_types/assignments: no * in device list
    
    If there are no dahdi devices, $devbase/* expans to have a literal '*',
    which leads to warnings such as:
    /usr/sbin/dahdi_span_types: 1: cd: can't cd to /sys/bus/dahdi_devices/devices/*
    
    Let's just avoid those.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/dahdi_span_assignments b/dahdi_span_assignments
index 19c70d3..bcafe89 100755
--- a/dahdi_span_assignments
+++ b/dahdi_span_assignments
@@ -141,7 +141,7 @@ fi
 if [ "$#" -gt 0 ]; then
 	DEVICES="$@"
 else
-	DEVICES=`echo $devbase/*`
+	DEVICES=`ls -d $devbase/* 2>/dev/null`
 fi
 
 # Beware of special characters in attributes
diff --git a/dahdi_span_types b/dahdi_span_types
index 48a0854..b12fc6f 100755
--- a/dahdi_span_types
+++ b/dahdi_span_types
@@ -120,7 +120,7 @@ fi
 if [ "$#" -gt 0 ]; then
 	DEVICES="$@"
 else
-	DEVICES=`echo $devbase/*`
+	DEVICES=`ls -d $devbase/* 2>/dev/null`
 fi
 
 # Beware of special characters in attributes

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


-- 
dahdi/tools.git



More information about the dahdi-commits mailing list