AFS

 view release on metacpan or  search on metacpan

pod/v2/afsperlcell.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# RCS-Id: "@(#)$RCS-Id: pod/v2/afsperlcell.pod 2e2ca60 Tue Apr 15 13:04:20 2014 +0200 Norbert E Gruener$"
#
# © 2001-2014 Norbert E. Gruener <nog@MPA-Garching.MPG.de>
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#------------------------------------------------------------------------------

=head1 NAME

B<AFS::Cell> - Module to administer B<AFS Cells>

=head1 SYNOPSIS

  use AFS::Cell qw (configdir expandcell
                    getcellinfo localcell
                    whichcell wscell
                   );

  my $conf_dir = configdir;

  my $cell = expandcell('mpa');
  $cell = localcell;
  $cell = whichcell('./');
  $cell = wscell;

  ($cell, my @hosts) = getcellinfo;
  print "Cell: $cell\n";
  foreach my $host (@hosts) {
      print(" $host\n");
  }

=head1 DESCRIPTION

This module provides several functions to configure and to maintain an
B<AFS cell>.  It is used to maintain the configuration directory.  Any
function required must by explicitly listed by the C<use> statement to be
exported into the calling package.

Some of these functions have the optional argument FOLLOW.  FOLLOW
determines which file should be used should PATH be a symbolic link.  If
FOLLOW be set to 1, then the symbolic link is followed to its target.
If FOLLOW is set to 0, then the function applies to the symbolic link
itself.  If not specified FOLLOW defaults to 1.

=head1 COMPATIBILITY

B<This release does NOT support any features and interfaces
from version 1.>

=head1 EXPORTS

=head2 Standard Exports

none

=head2 Optional Exports

The following functions will be exported into your namespace if you
specifically ask that they be imported.

=over 4

=item B<$dir = configdir;>

=item B<$ok = configdir(DIR);>

Gets or sets the configuration directory for an AFS server/client
machine. Default is C</usr/vice/etc>.

=item B<$cellname = expandcell(CELL);>

Expands CELL to the fully qualified cellname. Returns undef on error.

=cut

# does not work properly, return value $cell is not set properly ???

# =item B<($cell, @servers)  = getcell(INDEX [,IP]);>

# Displays the list of the database server machines that the Cache Manager
# stores in kernel memory for its home cell and foreign cells.

# Iterates through the Cache Manager's internal cell configuration,
# using INDEX as an index. The index starts at 0. $AFS::CODE will
# be set to a non-zero value when passed an invalid index. If IP is
# set to 1 then IP addresses will be returned instead of hostnames.
# Displays each database server machine's IP address rather than hostname.

=item B<($cell @servers) = getcellinfo([CELL [,IP]]);>

Gets information on CELL (default NULL) using CellServDB. If IP (default
0) is set to 1 then IP addresses will be returned instead of hostnames.

=item B<$cellname = localcell;>

Returns the cellname of the local cell. Returns undef on error.

=item B<$cellname = whichcell(PATH [,FOLLOW]);>

Returns the name of the cell in which the volume that houses PATH
resides.  Returns undef and sets CODE on error.

=item B<$cellname = wscell;>

Returns the name of the local machine's home cell.

=back

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.527 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )