[dahdi-commits] tzafrir: branch tools/tzafrir/sysfs r8773 - in /tools/team/tzafrir/sysfs: ./ ...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Jun 14 18:15:15 CDT 2010
Author: tzafrir
Date: Mon Jun 14 18:15:12 2010
New Revision: 8773
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8773
Log:
bugfix: fix span alias generation in genconf
* rev 7872 modified the span names (/dev/dahdi/span-names/<name>/<span_id>
* Don't initialize $span->alias to an empty value. Leave undefined, so as
not to mess the test for generating $unique_string from alias or hardware
address.
* Replace all left-over '/' with '!'
* Also, don't append '(<span_id>)' to the alias, since we already
calculate $span->alias correctly.
* Also, in 'dahdi_alias' don't issue an error output for ./dahdi_alias active
if the /dev/dahdi/span-aliases does not exist
Modified:
tools/team/tzafrir/sysfs/dahdi_aliases
tools/team/tzafrir/sysfs/xpp/perl_modules/Dahdi/Span.pm
Modified: tools/team/tzafrir/sysfs/dahdi_aliases
URL: http://svnview.digium.com/svn/dahdi/tools/team/tzafrir/sysfs/dahdi_aliases?view=diff&rev=8773&r1=8772&r2=8773
==============================================================================
--- tools/team/tzafrir/sysfs/dahdi_aliases (original)
+++ tools/team/tzafrir/sysfs/dahdi_aliases Mon Jun 14 18:15:12 2010
@@ -53,7 +53,7 @@
rm -rf "$SPAN_ALIASES"
;;
active)
- ls "$SPAN_ALIASES" | while read name
+ ls "$SPAN_ALIASES" 2> /dev/null | while read name
do
l=`readlink "$SPAN_ALIASES/$name" | sed "s,$SPAN_NAMES/*,,"`
printf "%s\t%s\n" "$name" "$l"
Modified: tools/team/tzafrir/sysfs/xpp/perl_modules/Dahdi/Span.pm
URL: http://svnview.digium.com/svn/dahdi/tools/team/tzafrir/sysfs/xpp/perl_modules/Dahdi/Span.pm?view=diff&rev=8773&r1=8772&r2=8773
==============================================================================
--- tools/team/tzafrir/sysfs/xpp/perl_modules/Dahdi/Span.pm (original)
+++ tools/team/tzafrir/sysfs/xpp/perl_modules/Dahdi/Span.pm Mon Jun 14 18:15:12 2010
@@ -312,7 +312,6 @@
my $location = $span->location;
my $name_base = '/dev/dahdi/span-aliases';
my @names = glob "$name_base/*/*";
- $span->{ALIAS} = '';
foreach my $n (@names) {
next unless -l $n;
my $l = readlink $n;
@@ -322,6 +321,7 @@
next if $location && $n =~ /^\Q$location\E.*/;
$l =~ s|/dev/dahdi/spans/0*||;
if ($l == $span_num) {
+ $n =~ tr{/}{!};
$span->{ALIAS} = $n;
#print STDERR "DEBUG($span_num): '$n'\t-> '$l'\n";
}
@@ -364,7 +364,7 @@
$self->{ALARMS} = $self->_get_dev_attr('alarms');
my $hwname = $self->hardware_id || $self->location;
if (defined $self->alias && $self->alias) {
- my $unique_string = sprintf "span-aliases!%s!%s", $self->alias, $self->{SPAN_ID};
+ my $unique_string = sprintf "span-aliases!%s", $self->alias;
$self->{UNIQUE_STRING} = $unique_string;
} elsif (defined $hwname) {
my $unique_string = sprintf "span-names!%s!%s", $hwname, $self->{SPAN_ID};
More information about the dahdi-commits
mailing list