summaryrefslogtreecommitdiff
path: root/xpp/utils/xpp_sync
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/utils/xpp_sync')
-rwxr-xr-xxpp/utils/xpp_sync29
1 files changed, 27 insertions, 2 deletions
diff --git a/xpp/utils/xpp_sync b/xpp/utils/xpp_sync
index 80b61c7..1438f50 100755
--- a/xpp/utils/xpp_sync
+++ b/xpp/utils/xpp_sync
@@ -17,7 +17,20 @@ use Zaptel::Xpp::Xbus;
my $sync;
my $autoselect;
+sub usage() {
+ print
+ "$0: show / set Astribank sync source\n".
+ "\n".
+ "Usage: $0 Show sync source.\n".
+ " $0 <auto|NN|zaptel> Set sync source.\n".
+ "";
+}
+
if(@ARGV == 1) {
+ if ($ARGV[0] =~ /^(-h|--help|help)$/) {
+ usage;
+ exit(0);
+ }
$sync = shift;
$autoselect = 1 if $sync =~ /^auto$/i;
}
@@ -142,7 +155,7 @@ xpp_sync - Handle sync selection of Xorcom Astribanks.
=head1 SYNOPSIS
-xpp_sync [auto|host|nn]
+xpp_sync [auto|zaptel|nn]
=head1 DESCRIPTION
@@ -164,12 +177,18 @@ output of xpp_sync, it may be unregistered. Try running zt_registration .
Automatically selects the best Astribank for syncing.
+=item zaptel
+
+Gets synchronization from the Zaptel sync master.
+
=item nn
-Set XBUS number nn as sync source.
+Sets XBUS-I<nn> as sync source.
=back
+(Parameter name is case-insensitive)
+
=head2 Example output:
Setting SYNC
@@ -188,6 +207,12 @@ In this example we see that the recommended xpp sync master is XBUS-02 -
it is the first on the list. It is also the actual syncer, as we can see
from the '+' beside it.
+xpp_sync is normally called from both the zaptel init.d script and the
+the Astribank udev script. The parameter it is called with defaults to
+I<auto>, but it is possible to override that parameter (e.g: set it to
+I<zaptel>) through the value of XPP_SYNC in either /etc/defualt/zaptel
+or /etc/sysconfig/zaptel .
+
=head1 FILES
=over