Terminology rename: "pinned" -> "assigned"

* File names fixed
* File contents fixed

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
Oron Peled 2013-11-18 11:14:34 -05:00 committed by Tzafrir Cohen
parent 791a596c07
commit 2a84216fe4
8 changed files with 36 additions and 36 deletions

View File

@ -105,9 +105,9 @@ ifeq (1,$(PBX_HDLC))
endif endif
MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8)) MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
PINNED_DATA_SCRIPTS:=handle_device span_config ASSIGNED_DATA_SCRIPTS:=handle_device span_config
PINNED_UTILS:=span_assignments span_types ASSIGNED_UTILS:=span_assignments span_types
PINNED_CONF:=pinned-spans.conf.sample span-types.conf.sample ASSIGNED_CONF:=assigned-spans.conf.sample span-types.conf.sample
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:
@ -228,9 +228,9 @@ ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
$(INSTALL) -m 644 system.conf.sample $(DESTDIR)$(CONFIG_FILE) $(INSTALL) -m 644 system.conf.sample $(DESTDIR)$(CONFIG_FILE)
endif endif
install -d $(DESTDIR)$(DATA_DIR) install -d $(DESTDIR)$(DATA_DIR)
install $(PINNED_DATA_SCRIPTS) $(DESTDIR)$(DATA_DIR)/ install $(ASSIGNED_DATA_SCRIPTS) $(DESTDIR)$(DATA_DIR)/
install $(PINNED_UTILS) $(DESTDIR)/$(BIN_DIR)/ install $(ASSIGNED_UTILS) $(DESTDIR)/$(BIN_DIR)/
install -m 644 $(PINNED_CONF) $(DESTDIR)/$(CONFIG_DIR)/ install -m 644 $(ASSIGNED_CONF) $(DESTDIR)/$(CONFIG_DIR)/
install-libs: libs install-libs: libs
$(INSTALL) -d -m 755 $(DESTDIR)/$(LIB_DIR) $(INSTALL) -d -m 755 $(DESTDIR)/$(LIB_DIR)

View File

@ -1,5 +1,5 @@
# #
# /etc/dahdi/pinned-spans.conf: # /etc/dahdi/assigned-spans.conf:
# #
# This file assigns span and channel numbers to dahdi devices # This file assigns span and channel numbers to dahdi devices
# #

View File

@ -26,7 +26,7 @@ order.
.B span_assignments .B 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/pinned-spans.conf . .B /etc/dahdi/assigned-spans.conf .
.SH OPTIONS .SH OPTIONS
@ -36,7 +36,7 @@ There are several sub-commands:
.RS .RS
Parameters are paths (in SysFS) to DAHDI devices with unregistered Parameters are paths (in SysFS) to DAHDI devices with unregistered
spans. The command will register with DAHDI according to according to spans. The command will register with DAHDI according to according to
configuration in \fBpinned-spans.conf\fR. configuration in \fBassigned-spans.conf\fR.
.RE .RE
.B remove \fIdevpath \fB[\fIdevpath \fB...] .B remove \fIdevpath \fB[\fIdevpath \fB...]
@ -60,10 +60,10 @@ List all spans in the system.
.B dumpconfig .B dumpconfig
.RS .RS
List all registered spans in the system in a format fit to be used in List all registered spans in the system in a format fit to be used in
\fBpinned-spans.conf\fR. Use this to generate a configuration file after \fBassigned-spans.conf\fR. Use this to generate a configuration file after
you have (perhaps manually) registered all existing spans. you have (perhaps manually) registered all existing spans.
.B dahdi_genconf pinnedspans .B dahdi_genconf assignedspans
uses this command internally. uses this command internally.
.RE .RE
@ -102,7 +102,7 @@ Path in SysFS to the device node.
.RE .RE
.SH CONFIGURATOIN .SH CONFIGURATOIN
.B pinned-spans.conf .B assigned-spans.conf
is a file with lines specifying registration of spans. is a file with lines specifying registration of spans.
Empty lines or lines beginning with '#' are ignored. Empty lines or lines beginning with '#' are ignored.
@ -168,13 +168,13 @@ space must be available.
.B DAHDICONFDIR .B DAHDICONFDIR
.RS .RS
The directory in which pinned-spans.conf resides. /etc/dahdi if not The directory in which assigned-spans.conf resides. /etc/dahdi if not
overridden from the environment. overridden from the environment.
.RE .RE
.B pinned_spans_conf .B assigned_spans_conf
.RS .RS
The path to pinned-spans.conf resides. /etc/dahdi/pinned-spans.conf if The path to assigned-spans.conf resides. /etc/dahdi/assigned-spans.conf if
not overridden from the environment. not overridden from the environment.
.RE .RE
@ -187,7 +187,7 @@ environment.
.SH FILES .SH FILES
.B /etc/dahdi/pinned-spans.conf .B /etc/dahdi/assigned-spans.conf
.RS .RS
The default location for the configuration file. The default location for the configuration file.
.RE .RE

View File

@ -62,7 +62,7 @@ add)
if [ -r "$DAHDICONFDIR/span-types.conf" ]; then if [ -r "$DAHDICONFDIR/span-types.conf" ]; then
span_types set "/sys$DEVPATH" span_types set "/sys$DEVPATH"
fi fi
if [ -r "$DAHDICONFDIR/pinned-spans.conf" ]; then if [ -r "$DAHDICONFDIR/assigned-spans.conf" ]; then
span_assignments add "/sys$DEVPATH" span_assignments add "/sys$DEVPATH"
else else
# No configuration. No order guaranteed # No configuration. No order guaranteed

View File

@ -6,17 +6,17 @@
# from the command line to assign/unassign and list # from the command line to assign/unassign and list
# current span assignments. # current span assignments.
# #
# It uses a configuration file: $DAHDICONFDIR/pinned-spans.conf # It uses a configuration file: $DAHDICONFDIR/assigned-spans.conf
# (default DAHDICONFDIR=/etc/dahdi) # (default DAHDICONFDIR=/etc/dahdi)
# #
# The first argument is an action: # The first argument is an action:
# "auto" - trigger driver auto_assign attribute for given devices # "auto" - trigger driver auto_assign attribute for given devices
# (no configuration file is used) # (no configuration file is used)
# "add" - assign (spans which are not already assigned), according # "add" - assign (spans which are not already assigned), according
# to /etc/dahdi/pinned-spans.conf configuration file # to /etc/dahdi/assigned-spans.conf configuration file
# "remove" - unassign spans which are not already unassigned # "remove" - unassign spans which are not already unassigned
# "list" - human-readable list of all spans (with/without assignments) # "list" - human-readable list of all spans (with/without assignments)
# "dumpconfig" - dump current assignments in a /etc/dahdi/pinned-spans.conf # "dumpconfig" - dump current assignments in a /etc/dahdi/assigned-spans.conf
# compatible format # compatible format
# #
# Without further arguments, it operates on all existing spans # Without further arguments, it operates on all existing spans
@ -54,7 +54,7 @@
devbase='/sys/bus/dahdi_devices/devices' devbase='/sys/bus/dahdi_devices/devices'
DAHDICONFDIR="${DAHDICONFDIR:-/etc/dahdi}" DAHDICONFDIR="${DAHDICONFDIR:-/etc/dahdi}"
pinned_spans_conf="$DAHDICONFDIR/pinned-spans.conf" assigned_spans_conf="$DAHDICONFDIR/assigned-spans.conf"
SPAN_ASSIGNMENTS_KEY=${SPAN_ASSIGNMENTS_KEY:-hwid} SPAN_ASSIGNMENTS_KEY=${SPAN_ASSIGNMENTS_KEY:-hwid}
dry_run= dry_run=
verbose= verbose=
@ -63,7 +63,7 @@ usage() {
echo >&2 "Usage: $0 [options] action [devpath ...]" echo >&2 "Usage: $0 [options] action [devpath ...]"
echo >&2 " action:" echo >&2 " action:"
echo >&2 " auto - trigger driver auto_assign attribute for given devices" echo >&2 " auto - trigger driver auto_assign attribute for given devices"
echo >&2 " add - assign spans, according to /etc/dahdi/pinned-spans.conf" echo >&2 " add - assign spans, according to /etc/dahdi/assigned-spans.conf"
echo >&2 " remove - unassign spans" echo >&2 " remove - unassign spans"
echo >&2 " list - human-readable list of all spans" echo >&2 " list - human-readable list of all spans"
echo >&2 " dumpconfig - dump current state as new configuration" echo >&2 " dumpconfig - dump current state as new configuration"
@ -228,7 +228,7 @@ unassign_all_spans() {
# Allow comments and empty lines in config file # Allow comments and empty lines in config file
filter_conf() { filter_conf() {
sed -e 's/#.*//' -e '/^[ \t]*$/d' "$pinned_spans_conf" sed -e 's/#.*//' -e '/^[ \t]*$/d' "$assigned_spans_conf"
} }
assign_device_spans() { assign_device_spans() {
@ -289,11 +289,11 @@ match_device() {
} }
assign_devices() { assign_devices() {
if [ ! -f "$pinned_spans_conf" ]; then if [ ! -f "$assigned_spans_conf" ]; then
echo >&2 "$0: Missing '$pinned_spans_conf'" echo >&2 "$0: Missing '$assigned_spans_conf'"
exit 1 exit 1
fi fi
echo "using '$pinned_spans_conf'" echo "using '$assigned_spans_conf'"
for device in $DEVICES for device in $DEVICES
do do
match_device "$device" match_device "$device"

View File

@ -54,7 +54,7 @@ sub generator_list($) {
} }
} else { } else {
# No files given. Use the defaults. # No files given. Use the defaults.
@genlist = ('spantypes', 'pinnedspans', 'system', 'chandahdi'); @genlist = ('spantypes', 'assignedspans', 'system', 'chandahdi');
if($gconfig->{'pri_connection_type'} eq 'R2') { if($gconfig->{'pri_connection_type'} eq 'R2') {
push @genlist, 'unicall'; push @genlist, 'unicall';
} }

View File

@ -36,9 +36,9 @@ getopts('vRs:', \%opts) || usage;
my $dahdi_autoreg = check_param('/sys/module/xpp/parameters/dahdi_autoreg') eq 'Y'; my $dahdi_autoreg = check_param('/sys/module/xpp/parameters/dahdi_autoreg') eq 'Y';
my $auto_assign_spans = check_param('/sys/module/dahdi/parameters/auto_assign_spans') eq '1'; my $auto_assign_spans = check_param('/sys/module/dahdi/parameters/auto_assign_spans') eq '1';
my $pinned_spans_config = $ENV{'PINNED_SPANS_CONF_FILE'} || '/etc/dahdi/pinned-spans.conf'; my $assigned_spans_config = $ENV{'ASSIGNED_SPANS_CONF_FILE'} || '/etc/dahdi/assigned-spans.conf';
my $span_types_config = $ENV{'SPAN_TYPES_CONF_FILE'} || '/etc/dahdi/span-types.conf'; my $span_types_config = $ENV{'SPAN_TYPES_CONF_FILE'} || '/etc/dahdi/span-types.conf';
my $have_pinned_spans_config = -f $pinned_spans_config || 0; my $have_assigned_spans_config = -f $assigned_spans_config || 0;
my $have_span_types_config = -f $span_types_config || 0; my $have_span_types_config = -f $span_types_config || 0;
my $sorter; my $sorter;
@ -60,7 +60,7 @@ my $on = shift;
my $verbose = $opts{'v'}; my $verbose = $opts{'v'};
my $should_output = 1; my $should_output = 1;
#print "dahdi_autoreg=$dahdi_autoreg auto_assign_spans=$auto_assign_spans have_pinned_spans_config='$have_pinned_spans_config' have_span_types_config='$have_span_types_config'\n"; #print "dahdi_autoreg=$dahdi_autoreg auto_assign_spans=$auto_assign_spans have_assigned_spans_config='$have_assigned_spans_config' have_span_types_config='$have_span_types_config'\n";
if(defined($on)) { # Translate to booleans if(defined($on)) { # Translate to booleans
$on = uc($on); $on = uc($on);
@ -100,8 +100,8 @@ foreach my $xbus (Dahdi::Xpp::xbuses($sorter)) {
} }
myprintf "%3s ==> %3s\n", state2str($prev), state2str($on); myprintf "%3s ==> %3s\n", state2str($prev), state2str($on);
} }
if (defined($on) && $on && ! $have_pinned_spans_config && ! $auto_assign_spans) { if (defined($on) && $on && ! $have_assigned_spans_config && ! $auto_assign_spans) {
# Emulate /etc/dahdi/pinned-spans.conf: # Emulate /etc/dahdi/assigned-spans.conf:
# - 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;

View File

@ -1,4 +1,4 @@
package Dahdi::Config::Gen::Pinnedspans; package Dahdi::Config::Gen::Assignedspans;
use strict; use strict;
use Dahdi::Config::Gen qw(is_true); use Dahdi::Config::Gen qw(is_true);
@ -7,7 +7,7 @@ sub new($$$) {
my $pack = shift || die; my $pack = shift || die;
my $gconfig = shift || die; my $gconfig = shift || die;
my $genopts = shift || die; my $genopts = shift || die;
my $file = $ENV{PINNED_SPANS_CONF_FILE} || "/etc/dahdi/pinned-spans.conf"; my $file = $ENV{ASSIGNED_SPANS_CONF_FILE} || "/etc/dahdi/assigned-spans.conf";
my $self = { my $self = {
FILE => $file, FILE => $file,
GCONFIG => $gconfig, GCONFIG => $gconfig,
@ -57,7 +57,7 @@ dahdi - Generate configuration for dahdi drivers.
=head1 DESCRIPTION =head1 DESCRIPTION
Generate the F</etc/dahdi/pinned-spans.conf>. Generate the F</etc/dahdi/assigned-spans.conf>.
This is the configuration for span_assignments. This is the configuration for span_assignments.
Its location may be overriden via the environment variable F<PINNED_SPANS_CONF_FILE>. Its location may be overriden via the environment variable F<ASSIGNED_SPANS_CONF_FILE>.