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@digium.com> Acked-by: Oron Peled <oron.peled@xorcom.com>
This commit is contained in:
parent
e298eb1237
commit
ffced0cad2
9
Makefile
9
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)
|
||||
|
@ -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"
|
||||
|
@ -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 &
|
||||
;;
|
@ -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'
|
@ -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
|
||||
#
|
@ -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
|
||||
#
|
||||
|
||||
|
@ -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
|
@ -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
|
@ -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).
|
||||
|
||||
|
@ -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>.
|
||||
|
@ -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>.
|
||||
|
Loading…
Reference in New Issue
Block a user