~ubuntu-branches/ubuntu/saucy/dahdi-tools/saucy

« back to all changes in this revision

Viewing changes to xpp/perl_modules/Dahdi.pm

  • Committer: Stefan Lesicnik
  • Date: 2011-05-08 12:22:46 UTC
  • mfrom: (2.1.4 sid)
  • Revision ID: stefan@lsd.co.za-20110508122246-lh6k2x1uy8pl3vdi
Tags: 1:2.4.1-1ubuntu1
* Merge from Debian. Remaining changes:
  - Bug Fix: If linux-headers are not installed, don't block, and print
    information for the user.
  - added debian/dahdi.postinst
  - added --error-handler=init_failed to debian/rules
  - Changes from Debian:
    - debian/control: Change Maintainer
    - debian/control: Removed Uploaders field.
    - debian/control: Removed Debian Vcs-Svn entry and replaced with
      ubuntu-voip Vcs-Bzr, to reflect divergence in packages.
    - debian/control: Package dahdi Depends on dahdi-dkms | dahdi-source
* debian/control: Added gawk as dependency for dkms build (LP: #493304)
* New upstream release (Closes: #581076, #582094).
* Patches hardware_rescan, perl_fix_noserial, perl_fix_transportdir,
  astribank_allow_ignoreend, init_unload_modules and wcb4xxp_extra_trunk
  dropped: merged upstream.
* dahdi-linux 2.3.0 is required (extra config options for dahdi_cfg).
* Convert to dpkg v.3 format.
* Standards version: 3.9.1.0 (No change needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# This program is free software; you can redistribute and/or
6
6
# modify it under the same terms as Perl itself.
7
7
#
8
 
# $Id: Dahdi.pm 6579 2009-05-08 10:21:05Z tzafrir $
 
8
# $Id: Dahdi.pm 8215 2010-03-02 18:07:37Z tzafrir $
9
9
#
10
10
use strict;
11
11
use Dahdi::Span;
32
32
  }
33
33
=cut
34
34
 
35
 
my $proc_base = "/proc/dahdi";
 
35
our $virt_base;
 
36
our $proc_dahdi_base;
 
37
our $proc_xpp_base;
 
38
our $proc_usb_base;
 
39
our $sys_base;
36
40
 
37
41
=head1 spans()
38
42
 
43
47
sub spans() {
44
48
        my @spans;
45
49
 
46
 
        -d $proc_base or return ();
47
 
        foreach my $zfile (glob "$proc_base/*") {
48
 
                $zfile =~ s:$proc_base/::;
49
 
                next unless ($zfile =~ /^\d+$/);
 
50
        -d $proc_dahdi_base or return ();
 
51
        foreach my $zfile (glob "$proc_dahdi_base/*") {
 
52
                next unless ($zfile =~ m{^$proc_dahdi_base/\d+$});
50
53
                my $span = Dahdi::Span->new($zfile);
51
54
                push(@spans, $span);
52
55
        }
54
57
        return @spans;
55
58
}
56
59
 
 
60
=head1 ENVIRONMENT
 
61
 
 
62
If C<DAHDI_VIRT_TOP> is set in the environment, it will be considered
 
63
as a path to a directory that holds a dump (copy) of all the required
 
64
files from /proc and /sys . You can generate that directory using the
 
65
script C<build_tools/dump_sys_state> .
 
66
 
57
67
=head1 SEE ALSO
58
68
 
59
69
Span objects: L<Dahdi::Span>.