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

« back to all changes in this revision

Viewing changes to xpp/xpp_sync

  • Committer: Bazaar Package Importer
  • Author(s): Jean-Michel Dault, Tzafrir Cohen
  • Date: 2010-02-16 13:44:09 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100216134409-4y4k26mgzyra537o
Tags: 1:2.2.1-0ubuntu1
* Merge from Debian pkg-voip.
  * 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

* From Debian pkg-voip:
[ Tzafrir Cohen ]
* New upstream release (Closes: #536257, #564381).
* Patch 'bashism' dropped: merged upstream. 
* Patch xpp_no_extra_at dropped: merged upstream. 
* Add an example genconf_parameters.
* Compat level 7.
* Bump standars version to 3.8.3.0 (no change needed)
* Udev rules are now in dahdi-linux.
* Patches perl_fix_noserial, perl_fix_transportdir: Fixes for some
  minor perl issues.
* Add the missing ${misc:Depends}, as per lintian. 
* Patch astribank_allow_ignoreend: an extra missing patch from upstream. 
* Patches init_unload_modules and init_unload_oslec: also unload OSLEC
  when unloading all modules.

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: xpp_sync 6313 2009-04-02 20:56:42Z tzafrir $
 
8
# $Id: xpp_sync 7492 2009-11-05 09:41:22Z tzafrir $
9
9
#
10
10
use strict;
11
11
use File::Basename;
 
12
use Getopt::Std;
12
13
BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
13
14
 
14
15
use Dahdi::Xpp;
21
22
        print 
22
23
                "$0: show / set Astribank sync source\n".
23
24
                "\n".
24
 
                "Usage: $0                    Show sync source.\n".
25
 
                "       $0 <auto|NN|dahdi>   Set sync source.\n".
 
25
                "Usage: $0 [-v]                    Show sync source.\n".
 
26
                "       $0 [-v] <auto|NN|dahdi>   Set sync source.\n".
26
27
                "";
 
28
        exit 1;
27
29
}
28
30
 
 
31
my %opts;
 
32
getopts('hv', \%opts) || usage;
 
33
 
 
34
$opts{h} && usage;
29
35
if(@ARGV == 1) {
30
 
        if ($ARGV[0] =~ /^(-h|--help|help)$/) {
31
 
                usage;
32
 
                exit(0);
33
 
        }
34
36
        $sync = shift;
35
37
        $autoselect = 1 if $sync =~ /^auto$/i;
36
38
}
52
54
                }
53
55
        }
54
56
        my @xpd_prio = Dahdi::Xpp::Xpd::xpds_by_rank(@good_xpds);
55
 
        #Dahdi::Xpp::Xpd::show_xpd_rank(@xpd_prio);
 
57
        Dahdi::Xpp::Xpd::show_xpd_rank(@xpd_prio) if $opts{v};
56
58
        return @xpd_prio;
57
59
}
58
60
 
143
145
 
144
146
=head1 SYNOPSIS
145
147
 
146
 
xpp_sync [auto|dahdi|nn]
 
148
xpp_sync <auto|dahdi|nn>
 
149
 
 
150
xpp_sync [-v]
147
151
 
148
152
=head1 DESCRIPTION
149
153
 
173
177
 
174
178
Sets XBUS-I<nn> as sync source.
175
179
 
 
180
=item -v
 
181
 
 
182
Also print the numeric xpp sync rank.
 
183
 
176
184
=back
177
185
 
178
186
(Parameter name is case-insensitive)
211
219
shows the current xpp sync master (and in what format you need to write
212
220
to it to set the master).
213
221
 
 
222
=back
 
223
 
214
224
=head1 SEE ALSO
215
225
 
216
226
dahdi_registration(1), dahdi_cfg(1), README.Astribank
217
 
 
218
 
=back