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:
Shaun Ruffell 2013-11-26 09:15:13 -06:00
parent e298eb1237
commit ffced0cad2
11 changed files with 51 additions and 50 deletions

View File

@ -103,12 +103,13 @@ endif
ifeq (1,$(PBX_HDLC)) ifeq (1,$(PBX_HDLC))
BINS += sethdlc BINS += sethdlc
endif endif
MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8)) ASSIGNED_DATA_SCRIPTS:=dahdi_handle_device dahdi_span_config
ASSIGNED_UTILS:=dahdi_span_assignments dahdi_span_types
ASSIGNED_DATA_SCRIPTS:=handle_device span_config
ASSIGNED_UTILS:=span_assignments span_types
ASSIGNED_CONF:=assigned-spans.conf.sample span-types.conf.sample 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 TEST_BINS:=patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest dahdi_maint
# All the man pages. Not just installed ones: # All the man pages. Not just installed ones:
GROFF_PAGES := $(wildcard doc/*.8 xpp/*.8) GROFF_PAGES := $(wildcard doc/*.8 xpp/*.8)

View File

@ -14,5 +14,5 @@ SUBSYSTEM=="dahdi_channels", SYSFS{location}!="", SYMLINK+="dahdi/devices/@%s{lo
LABEL="dahdi_add_end" LABEL="dahdi_add_end"
# hotplug scripts # hotplug scripts
SUBSYSTEM=="dahdi_devices", RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/handle_device" 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/span_config" SUBSYSTEM=="dahdi_spans", RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/dahdi_span_config"

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# #
# /usr/share/dahdi/handle_device # /usr/share/dahdi/dahdi_handle_device
# #
# Called by UDEV when a dahdi device is added/removed # Called by UDEV when a dahdi device is added/removed
# #
@ -60,13 +60,13 @@ add)
# Don't block udev for too long # Don't block udev for too long
( (
if [ -r "$DAHDICONFDIR/span-types.conf" ]; then if [ -r "$DAHDICONFDIR/span-types.conf" ]; then
span_types set "/sys$DEVPATH" dahdi_span_types set "/sys$DEVPATH"
fi fi
if [ -r "$DAHDICONFDIR/assigned-spans.conf" ]; then if [ -r "$DAHDICONFDIR/assigned-spans.conf" ]; then
span_assignments add "/sys$DEVPATH" dahdi_span_assignments add "/sys$DEVPATH"
else else
# No configuration. No order guaranteed # No configuration. No order guaranteed
span_assignments auto dahdi_span_assignments auto
fi fi
) 2>&1 < /dev/null | $LOGGER & ) 2>&1 < /dev/null | $LOGGER &
;; ;;

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# #
# /usr/sbin/span_assignments: # /usr/sbin/dahdi_span_assignments:
# #
# this script can be used both from udev and # this script can be used both from udev and
# from the command line to assign/unassign and list # from the command line to assign/unassign and list
@ -45,11 +45,11 @@
# variable. # variable.
# #
# Examples: # Examples:
# span_assignments list # dahdi_span_assignments list
# span_assignments add # all unassigned devices # dahdi_span_assignments add # all unassigned devices
# span_assignments add /sys/bus/dahdi_devices/devices/astribanks:xbus-00 # dahdi_span_assignments add /sys/bus/dahdi_devices/devices/astribanks:xbus-00
# span_assignments remove # all assigned devices # dahdi_span_assignments remove # all assigned devices
# span_assignments -k location dumpconfig # dahdi_span_assignments -k location dumpconfig
# #
devbase='/sys/bus/dahdi_devices/devices' devbase='/sys/bus/dahdi_devices/devices'

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# #
# /usr/share/dahdi/span_config # /usr/share/dahdi/dahdi_span_config
# #
# Called by UDEV when a dahdi span is added/removed # Called by UDEV when a dahdi span is added/removed
# #

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# #
# /usr/sbin/span_types # /usr/sbin/dahdi_span_types
# #
# This script can be used both from udev and # This script can be used both from udev and
# from the command line to manage PRI spans # from the command line to manage PRI spans
@ -38,10 +38,10 @@
# variable. # variable.
# #
# Examples: # Examples:
# span_types list # dahdi_span_types list
# span_types set # all devices # dahdi_span_types set # all devices
# span_types set /sys/bus/dahdi_devices/devices/astribanks:xbus-00 # dahdi_span_types set /sys/bus/dahdi_devices/devices/astribanks:xbus-00
# span_types -k location dumpconfig # dahdi_span_types -k location dumpconfig
# #

View File

@ -1,19 +1,19 @@
.TH "SPAN_ASSIGNMENTS" "8" "13 Oct 2013" "" "" .TH "SPAN_ASSIGNMENTS" "8" "13 Oct 2013" "" ""
.SH NAME .SH NAME
span_assignments \- handle DAHDI spans registration dahdi_span_assignments \- handle DAHDI spans registration
.SH SYNOPSIS .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...] \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 .SH DESCRIPTION
When the kernel module parameter \fBdahdi.auto_assign_span\fR is unset, 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 span and channel numbers. This allows registering different spans out of
order. order.
.B span_assignments .B dahdi_span_assignments
is used to register those spans or to help creating the configuration is used to register those spans or to help creating the configuration
file used in their registration: file used in their registration:
.B /etc/dahdi/assigned-spans.conf . .B /etc/dahdi/assigned-spans.conf .
@ -211,10 +211,10 @@ Write only files for the operations. Used by \fBadd\fR, \fBremove\fR and
.RE .RE
.SH SEE ALSO .SH SEE ALSO
span_types(8), dahdi_genconf(8), dahdi_cfg(8) dahdi_span_types(8), dahdi_genconf(8), dahdi_cfg(8)
.SH AUTHOR .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 written by Tzafrir Cohen. Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU General Public and/or modify this document under the terms of the GNU General Public
License, Version 2 any later version published by the Free Software License, Version 2 any later version published by the Free Software

View File

@ -1,14 +1,14 @@
.TH "SPAN_TYPES" "8" "13 Oct 2013" "" "" .TH "SPAN_TYPES" "8" "13 Oct 2013" "" ""
.SH NAME .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 .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 .SH DESCRIPTION
The span type (E1/T1/J1) must be set to a span before registering it 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. span type configuration to an unregistered span.
Using it only makes sense when the kernel module parameter 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. automatically.
.SH OPTIONS .SH OPTIONS
.B span_types .B dahdi_span_types
takes a command and an optional list of devices. If no device is given, takes a command and an optional list of devices. If no device is given,
the command is applied to all devices. the command is applied to all devices.
@ -31,7 +31,7 @@ specified).
.B list .B list
.RS .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). (E1/T1/J1 spans).
.RE .RE
@ -107,7 +107,7 @@ The directory in which span-types.conf resides. /etc/dahdi if not
overridden from the environment. overridden from the environment.
.RE .RE
.B span_types_conf .B dahdi_span_types_conf
.RS .RS
The path to span-types.conf resides. /etc/dahdi/span-types.conf if The path to span-types.conf resides. /etc/dahdi/span-types.conf if
not overridden from the environment. 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 .SH SEE ALSO
span_assignments(8), dahdi_genconf(8), dahdi_cfg(8) dahdi_span_assignments(8), dahdi_genconf(8), dahdi_cfg(8)
.SH AUTHOR .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 written by Tzafrir Cohen. Permission is granted to copy, distribute
and/or modify this document under the terms of the GNU General Public and/or modify this document under the terms of the GNU General Public
License, Version 2 any later version published by the Free Software License, Version 2 any later version published by the Free Software

View File

@ -105,7 +105,7 @@ foreach my $xbus (Dahdi::Xpp::xbuses($sorter)) {
# - We iterate over $xbus according to /etc/dahdi/xpp_order # - We iterate over $xbus according to /etc/dahdi/xpp_order
# - We "auto" assign all spans of current $xbus # - We "auto" assign all spans of current $xbus
my $devpath = sprintf "/sys/bus/dahdi_devices/devices/astribanks:xbus-%02d", $xbus->num; 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; system @cmd;
warn "Failed '@cmd' (status=$?)\n" if $?; 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 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<xpp.dahdi_autoreg> is false (and implicitly: when the module parameter
B<dahdi.auto_assign_span> is true). See also the NOTES section regarding 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. 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 specific span/channelss numbers specification. This allows registering
them out of order. To use this capability, the module parameter 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 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). (which may also be run automatically from a udev hook).
In this case there is no point in delaying XPP device registration with 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 =head1 SEE ALSO
B<dahdi_cfg>(8), B<span_assignments>(8). B<dahdi_cfg>(8), B<dahdi_span_assignments>(8).

View File

@ -26,7 +26,7 @@ sub generate($$$) {
# If the span_types utilities were not installed we do not want to run # If the span_types utilities were not installed we do not want to run
# this generator or report any errors. # 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 $?; return if $?;
warn "Empty configuration -- no spans\n" unless @spans; warn "Empty configuration -- no spans\n" unless @spans;
@ -35,7 +35,7 @@ sub generate($$$) {
or die "Failed to backup old config: $!\n"; or die "Failed to backup old config: $!\n";
#$gconfig->dump; #$gconfig->dump;
print "Generating $file\n" if $genopts->{verbose}; print "Generating $file\n" if $genopts->{verbose};
my $cmd = "span_assignments dumpconfig > $file"; my $cmd = "dahdi_span_assignments dumpconfig > $file";
system $cmd; system $cmd;
die "Command failed (status=$?): '$cmd'" if $?; die "Command failed (status=$?): '$cmd'" if $?;
} }
@ -58,6 +58,6 @@ dahdi - Generate configuration for dahdi drivers.
=head1 DESCRIPTION =head1 DESCRIPTION
Generate the F</etc/dahdi/assigned-spans.conf>. 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>. Its location may be overriden via the environment variable F<ASSIGNED_SPANS_CONF_FILE>.

View File

@ -24,9 +24,9 @@ sub generate($$$) {
my $genopts = $self->{GENOPTS}; my $genopts = $self->{GENOPTS};
my @spans = @_; 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. # 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 $?; return if $?;
warn "Empty configuration -- no spans\n" unless @spans; warn "Empty configuration -- no spans\n" unless @spans;
@ -35,7 +35,7 @@ sub generate($$$) {
or die "Failed to backup old config: $!\n"; or die "Failed to backup old config: $!\n";
#$gconfig->dump; #$gconfig->dump;
print "Generating $file\n" if $genopts->{verbose}; print "Generating $file\n" if $genopts->{verbose};
my $cmd = "span_types dumpconfig > $file"; my $cmd = "dahdi_span_types dumpconfig > $file";
system $cmd; system $cmd;
die "Command failed (status=$?): '$cmd'" if $?; die "Command failed (status=$?): '$cmd'" if $?;
} }
@ -58,6 +58,6 @@ dahdi - Generate configuration for dahdi drivers.
=head1 DESCRIPTION =head1 DESCRIPTION
Generate the F</etc/dahdi/span-types.conf>. 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>. Its location may be overriden via the environment variable F<SPAN_TYPES_CONF_FILE>.