diff options
Diffstat (limited to 'xpp/utils/zaptel_hardware')
-rwxr-xr-x | xpp/utils/zaptel_hardware | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xpp/utils/zaptel_hardware b/xpp/utils/zaptel_hardware index 26aa839..afd3a06 100755 --- a/xpp/utils/zaptel_hardware +++ b/xpp/utils/zaptel_hardware @@ -5,10 +5,11 @@ # This program is free software; you can redistribute and/or # modify it under the same terms as Perl itself. # -# $Id:$ +# $Id$ # use strict; -BEGIN { my $dir = $0; $dir =~ s:/[^/]+$::; unshift(@INC, "$dir", "$dir/zconf"); } +use File::Basename; +BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/zconf"); } use Zaptel; use Zaptel::Span; @@ -22,6 +23,8 @@ sub usage { @ARGV == 0 or usage; +Zaptel::Hardware->scan_hardware; + my @hardware = Zaptel::Hardware->devices; my @spans = Zaptel::spans; @@ -89,3 +92,8 @@ zaptel_hardware Show all zaptel hardware devices, both used and unused. +=head1 BUGS + +Assumes a bit too much about the output of lspci and sysfs. Currently +the PCI scanning will not work on e.g. CentOS 4. This should be fixed in +Zaptel::Hardware::PCI.pm |