[Pkg-voip-commits] [dahdi-tools] 143/285: Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config.
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:18:46 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 ffced0cad2a0209d1b385aea3d5e7fe848d6676f
Author: Shaun Ruffell <sruffell at digium.com>
Date: Tue Nov 26 09:15:13 2013 -0600
Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config.
All new dahdi tools and utilities will be prefixed with "dahdi_" in order to
avoid any future conflicts with other packages.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Oron Peled <oron.peled at xorcom.com>
---
Makefile | 9 +++++----
dahdi.rules | 4 ++--
handle_device => dahdi_handle_device | 8 ++++----
span_assignments => dahdi_span_assignments | 12 ++++++------
span_config => dahdi_span_config | 2 +-
span_types => dahdi_span_types | 10 +++++-----
doc/{span_assignments.8 => dahdi_span_assignments.8} | 18 +++++++++---------
doc/{span_types.8 => dahdi_span_types.8} | 16 ++++++++--------
xpp/dahdi_registration | 8 ++++----
xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm | 6 +++---
xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm | 8 ++++----
11 files changed, 51 insertions(+), 50 deletions(-)
diff --git a/Makefile b/Makefile
index bfc87b7..8824687 100644
--- a/Makefile
+++ b/Makefile
@@ -103,12 +103,13 @@ endif
ifeq (1,$(PBX_HDLC))
BINS += sethdlc
endif
-MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
-
-ASSIGNED_DATA_SCRIPTS:=handle_device span_config
-ASSIGNED_UTILS:=span_assignments span_types
+ASSIGNED_DATA_SCRIPTS:=dahdi_handle_device dahdi_span_config
+ASSIGNED_UTILS:=dahdi_span_assignments dahdi_span_types
ASSIGNED_CONF:=assigned-spans.conf.sample span-types.conf.sample
+MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
+MAN_PAGES:=$(wildcard $(ASSIGNED_UTILS:%=doc/%.8))
+
TEST_BINS:=patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest dahdi_maint
# All the man pages. Not just installed ones:
GROFF_PAGES := $(wildcard doc/*.8 xpp/*.8)
diff --git a/dahdi.rules b/dahdi.rules
index e2a629f..df79ce7 100644
--- a/dahdi.rules
+++ b/dahdi.rules
@@ -14,5 +14,5 @@ SUBSYSTEM=="dahdi_channels", SYSFS{location}!="", SYMLINK+="dahdi/devices/@%s{lo
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"
+SUBSYSTEM=="dahdi_devices", RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/dahdi_handle_device"
+SUBSYSTEM=="dahdi_spans", RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/dahdi_span_config"
diff --git a/handle_device b/dahdi_handle_device
similarity index 92%
rename from handle_device
rename to dahdi_handle_device
index 9079e6e..6f60f5b 100755
--- a/handle_device
+++ b/dahdi_handle_device
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# /usr/share/dahdi/handle_device
+# /usr/share/dahdi/dahdi_handle_device
#
# Called by UDEV when a dahdi device is added/removed
#
@@ -60,13 +60,13 @@ add)
# Don't block udev for too long
(
if [ -r "$DAHDICONFDIR/span-types.conf" ]; then
- span_types set "/sys$DEVPATH"
+ dahdi_span_types set "/sys$DEVPATH"
fi
if [ -r "$DAHDICONFDIR/assigned-spans.conf" ]; then
- span_assignments add "/sys$DEVPATH"
+ dahdi_span_assignments add "/sys$DEVPATH"
else
# No configuration. No order guaranteed
- span_assignments auto
+ dahdi_span_assignments auto
fi
) 2>&1 < /dev/null | $LOGGER &
;;
diff --git a/span_assignments b/dahdi_span_assignments
similarity index 96%
rename from span_assignments
rename to dahdi_span_assignments
index 86e8658..b26a2dc 100755
--- a/span_assignments
+++ b/dahdi_span_assignments
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# /usr/sbin/span_assignments:
+# /usr/sbin/dahdi_span_assignments:
#
# this script can be used both from udev and
# from the command line to assign/unassign and list
@@ -45,11 +45,11 @@
# variable.
#
# Examples:
-# span_assignments list
-# span_assignments add # all unassigned devices
-# span_assignments add /sys/bus/dahdi_devices/devices/astribanks:xbus-00
-# span_assignments remove # all assigned devices
-# span_assignments -k location dumpconfig
+# dahdi_span_assignments list
+# dahdi_span_assignments add # all unassigned devices
+# dahdi_span_assignments add /sys/bus/dahdi_devices/devices/astribanks:xbus-00
+# dahdi_span_assignments remove # all assigned devices
+# dahdi_span_assignments -k location dumpconfig
#
devbase='/sys/bus/dahdi_devices/devices'
diff --git a/span_config b/dahdi_span_config
similarity index 98%
rename from span_config
rename to dahdi_span_config
index 226a37f..3562278 100755
--- a/span_config
+++ b/dahdi_span_config
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# /usr/share/dahdi/span_config
+# /usr/share/dahdi/dahdi_span_config
#
# Called by UDEV when a dahdi span is added/removed
#
diff --git a/span_types b/dahdi_span_types
similarity index 96%
rename from span_types
rename to dahdi_span_types
index 774b341..293a90c 100755
--- a/span_types
+++ b/dahdi_span_types
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# /usr/sbin/span_types
+# /usr/sbin/dahdi_span_types
#
# This script can be used both from udev and
# from the command line to manage PRI spans
@@ -38,10 +38,10 @@
# variable.
#
# Examples:
-# span_types list
-# span_types set # all devices
-# span_types set /sys/bus/dahdi_devices/devices/astribanks:xbus-00
-# span_types -k location dumpconfig
+# dahdi_span_types list
+# dahdi_span_types set # all devices
+# dahdi_span_types set /sys/bus/dahdi_devices/devices/astribanks:xbus-00
+# dahdi_span_types -k location dumpconfig
#
diff --git a/doc/span_assignments.8 b/doc/dahdi_span_assignments.8
similarity index 90%
rename from doc/span_assignments.8
rename to doc/dahdi_span_assignments.8
index e6fbba0..46083b3 100644
--- a/doc/span_assignments.8
+++ b/doc/dahdi_span_assignments.8
@@ -1,19 +1,19 @@
.TH "SPAN_ASSIGNMENTS" "8" "13 Oct 2013" "" ""
.SH NAME
-span_assignments \- handle DAHDI spans registration
+dahdi_span_assignments \- handle DAHDI spans registration
.SH SYNOPSIS
-.B span_assignments [\-v|\-\-verbose] [\-n|\-\-dry\-run] <add|remove> \fIdevpath
+.B dahdi_span_assignments [\-v|\-\-verbose] [\-n|\-\-dry\-run] <add|remove> \fIdevpath
\fB[\fIdevpath \fB...]
-.B span_assignments [\-v|\-\-verbose] [\-n|\-\-dry\-run] auto
+.B dahdi_span_assignments [\-v|\-\-verbose] [\-n|\-\-dry\-run] auto
-.B span_assignments [\-v|\-\-verbose] list
+.B dahdi_span_assignments [\-v|\-\-verbose] list
-.B span_assignments [\-v|\-\-verbose] [\-k|\-\-key \fIkey\fB] dumpconfig
+.B dahdi_span_assignments [\-v|\-\-verbose] [\-k|\-\-key \fIkey\fB] dumpconfig
-.B span_assignments \-h|\-\-help
+.B dahdi_span_assignments \-h|\-\-help
.SH DESCRIPTION
When the kernel module parameter \fBdahdi.auto_assign_span\fR is unset,
@@ -23,7 +23,7 @@ DAHDI. This allows user-space to order DAHDI to register them to specific
span and channel numbers. This allows registering different spans out of
order.
-.B span_assignments
+.B dahdi_span_assignments
is used to register those spans or to help creating the configuration
file used in their registration:
.B /etc/dahdi/assigned-spans.conf .
@@ -211,10 +211,10 @@ Write only files for the operations. Used by \fBadd\fR, \fBremove\fR and
.RE
.SH SEE ALSO
-span_types(8), dahdi_genconf(8), dahdi_cfg(8)
+dahdi_span_types(8), dahdi_genconf(8), dahdi_cfg(8)
.SH AUTHOR
-span_assignments was written by Oron Peled. This manual page was
+dahdi_span_assignments was written by Oron Peled. This manual page was
written by Tzafrir Cohen. Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU General Public
License, Version 2 any later version published by the Free Software
diff --git a/doc/span_types.8 b/doc/dahdi_span_types.8
similarity index 88%
rename from doc/span_types.8
rename to doc/dahdi_span_types.8
index 0531804..d28b8e0 100644
--- a/doc/span_types.8
+++ b/doc/dahdi_span_types.8
@@ -1,14 +1,14 @@
.TH "SPAN_TYPES" "8" "13 Oct 2013" "" ""
.SH NAME
-span_types \- set DAHDI spans properties before registration (E1/T1)
+dahdi_span_types \- set DAHDI spans properties before registration (E1/T1)
.SH SYNOPSIS
-.B span_types <list|dumpconfig|set> [\fIdevpath \fB[\fIdevpath \fB...]]
+.B dahdi_span_types <list|dumpconfig|set> [\fIdevpath \fB[\fIdevpath \fB...]]
.SH DESCRIPTION
The span type (E1/T1/J1) must be set to a span before registering it
-with DAHDI, as E1 spans use more channels. \fBspan_types\fR applies the
+with DAHDI, as E1 spans use more channels. \fBdahdi_span_types\fR applies the
span type configuration to an unregistered span.
Using it only makes sense when the kernel module parameter
@@ -16,7 +16,7 @@ Using it only makes sense when the kernel module parameter
automatically.
.SH OPTIONS
-.B span_types
+.B dahdi_span_types
takes a command and an optional list of devices. If no device is given,
the command is applied to all devices.
@@ -31,7 +31,7 @@ specified).
.B list
.RS
-List types for all spans in the system which may be set with span_types
+List types for all spans in the system which may be set with dahdi_span_types
(E1/T1/J1 spans).
.RE
@@ -107,7 +107,7 @@ The directory in which span-types.conf resides. /etc/dahdi if not
overridden from the environment.
.RE
-.B span_types_conf
+.B dahdi_span_types_conf
.RS
The path to span-types.conf resides. /etc/dahdi/span-types.conf if
not overridden from the environment.
@@ -135,10 +135,10 @@ of the device. Span-specifications can be written to it to change types
.SH SEE ALSO
-span_assignments(8), dahdi_genconf(8), dahdi_cfg(8)
+dahdi_span_assignments(8), dahdi_genconf(8), dahdi_cfg(8)
.SH AUTHOR
-span_types was written by Oron Peled. This manual page was
+dahdi_span_types was written by Oron Peled. This manual page was
written by Tzafrir Cohen. Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU General Public
License, Version 2 any later version published by the Free Software
diff --git a/xpp/dahdi_registration b/xpp/dahdi_registration
index 9902de6..bd6641e 100755
--- a/xpp/dahdi_registration
+++ b/xpp/dahdi_registration
@@ -105,7 +105,7 @@ foreach my $xbus (Dahdi::Xpp::xbuses($sorter)) {
# - 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;
- my @cmd = ('span_assignments', 'auto', $devpath);
+ my @cmd = ('dahdi_span_assignments', 'auto', $devpath);
system @cmd;
warn "Failed '@cmd' (status=$?)\n" if $?;
}
@@ -137,7 +137,7 @@ you'll also see those channels as '(In use)' in the output of lsdahdi(8).
dahdi_registration is intended to be used when the kernel module parameter
B<xpp.dahdi_autoreg> is false (and implicitly: when the module parameter
B<dahdi.auto_assign_span> is true). See also the NOTES section regarding
-C<span_assignments>.
+C<dahdi_span_assignments>.
If dahdi_autoreg is true, the program will normally do nothing.
@@ -226,7 +226,7 @@ Newer versions of DAHDI added support for registering a span to a
specific span/channelss numbers specification. This allows registering
them out of order. To use this capability, the module parameter
B<dahdi.auto_assign_span> should be unset (set to 0) and thus spans of
-detected DAHDI devices could be registered using C<span_assignments>
+detected DAHDI devices could be registered using C<dahdi_span_assignments>
(which may also be run automatically from a udev hook).
In this case there is no point in delaying XPP device registration with
@@ -235,5 +235,5 @@ dahdi_registration will simply become a no-op.
=head1 SEE ALSO
-B<dahdi_cfg>(8), B<span_assignments>(8).
+B<dahdi_cfg>(8), B<dahdi_span_assignments>(8).
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm b/xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm
index ee06ca7..a92eead 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Assignedspans.pm
@@ -26,7 +26,7 @@ sub generate($$$) {
# 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";
+ system "which dahdi_span_assignments > /dev/null 2>&1";
return if $?;
warn "Empty configuration -- no spans\n" unless @spans;
@@ -35,7 +35,7 @@ sub generate($$$) {
or die "Failed to backup old config: $!\n";
#$gconfig->dump;
print "Generating $file\n" if $genopts->{verbose};
- my $cmd = "span_assignments dumpconfig > $file";
+ my $cmd = "dahdi_span_assignments dumpconfig > $file";
system $cmd;
die "Command failed (status=$?): '$cmd'" if $?;
}
@@ -58,6 +58,6 @@ dahdi - Generate configuration for dahdi drivers.
=head1 DESCRIPTION
Generate the F</etc/dahdi/assigned-spans.conf>.
-This is the configuration for span_assignments.
+This is the configuration for dahdi_span_assignments.
Its location may be overriden via the environment variable F<ASSIGNED_SPANS_CONF_FILE>.
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm b/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm
index 9ef31ae..6579685 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/Spantypes.pm
@@ -24,9 +24,9 @@ sub generate($$$) {
my $genopts = $self->{GENOPTS};
my @spans = @_;
- # If the span_types utilities were not installed we do not want to run
+ # If the dahdi_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";
+ system "which dahdi_span_types > /dev/null 2>&1";
return if $?;
warn "Empty configuration -- no spans\n" unless @spans;
@@ -35,7 +35,7 @@ sub generate($$$) {
or die "Failed to backup old config: $!\n";
#$gconfig->dump;
print "Generating $file\n" if $genopts->{verbose};
- my $cmd = "span_types dumpconfig > $file";
+ my $cmd = "dahdi_span_types dumpconfig > $file";
system $cmd;
die "Command failed (status=$?): '$cmd'" if $?;
}
@@ -58,6 +58,6 @@ dahdi - Generate configuration for dahdi drivers.
=head1 DESCRIPTION
Generate the F</etc/dahdi/span-types.conf>.
-This is the configuration for span_types.
+This is the configuration for dahdi_span_types.
Its location may be overriden via the environment variable F<SPAN_TYPES_CONF_FILE>.
--
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