[dahdi-commits] dahdi/tools.git branch "master" updated.
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Fri Nov 22 11:13:02 CST 2013
branch "master" has been updated
via 8d9a6bdd8097e3545d14827a61a80a6eca4e9330 (commit)
from bb19620c5254ad17d52c24500918140cca1276d3 (commit)
Summary of changes:
xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm | 6 ++++++
xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm | 6 ++++++
2 files changed, 12 insertions(+)
- Log -----------------------------------------------------------------
commit 8d9a6bdd8097e3545d14827a61a80a6eca4e9330
Author: Shaun Ruffell <sruffell at digium.com>
Date: Thu Nov 14 12:19:45 2013 -0600
dahdi_genconf: Do not fail if pinned/assigned span utilities were not installed.
If you installed dahdi tools and did not specify DAHDI_PINNED=yes on the
makefile, when you run dahdi_genconf you would get an error like the following:
# dahdi_genconf
sh: span_types: command not found
Command failed (status=32512): 'span_types dumpconfig > /etc/dahdi/span-types.conf' at ...
This change allows the generator for span-types.conf and span-assignements.conf
check for the existence of the utilities before attempting to call them.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm b/xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm
index 8eaf72d..67b8547 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Pinnedspans.pm
@@ -23,6 +23,12 @@ sub generate($$$) {
my $gconfig = $self->{GCONFIG};
my $genopts = $self->{GENOPTS};
my @spans = @_;
+
+ # If the span_types utilities were not installed we do not want to run
+ # this generator or report any errors.
+ system "which span_assignments > /dev/null 2>&1";
+ return if $?;
+
warn "Empty configuration -- no spans\n" unless @spans;
rename "$file", "$file.bak"
or $! == 2 # ENOENT (No dependency on Errno.pm)
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm b/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm
index 1a31a62..9ef31ae 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm
@@ -23,6 +23,12 @@ sub generate($$$) {
my $gconfig = $self->{GCONFIG};
my $genopts = $self->{GENOPTS};
my @spans = @_;
+
+ # If the span_types utilities were not installed we do not want to run
+ # this generator or report any errors.
+ system "which span_types > /dev/null 2>&1";
+ return if $?;
+
warn "Empty configuration -- no spans\n" unless @spans;
rename "$file", "$file.bak"
or $! == 2 # ENOENT (No dependency on Errno.pm)
-----------------------------------------------------------------------
--
dahdi/tools.git
More information about the dahdi-commits
mailing list