AFS

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

examples/v2/bos/setauth
examples/v2/bos/setcellname
examples/v2/bos/setrestart
examples/v2/bos/setrestricted
examples/v2/bos/shutdown
examples/v2/bos/start
examples/v2/bos/startup
examples/v2/bos/status
examples/v2/bos/stop
examples/v2/cell/configdir
examples/v2/cell/expandcell
examples/v2/cell/getcellinfo
examples/v2/cell/localcell
examples/v2/cell/whichcell
examples/v2/cell/wscell
examples/v2/cm/checkconn
examples/v2/cm/checkvolumes
examples/v2/cm/cm_access
examples/v2/cm/flush
examples/v2/cm/flushcb
examples/v2/cm/flushvolume

examples/v2/cell/expandcell  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::Cell qw (expandcell);

die "Usage: $0 cellname \n" if $#ARGV != 0;
my $c = shift;

my $cell = expandcell($c);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "cell = $cell\n"; }

examples/v2/ktcp/constructor  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::KTC_PRINCIPAL;
use AFS::Cell qw(expandcell);

die "Usage: $0 principal\n" if ($#ARGV != 0);

my $name = shift;

my $princ = AFS::KTC_PRINCIPAL->new($name);

$princ->cell(expandcell($princ->cell));

print "name      = ", $princ->name, "\n";
print "instance  = ", $princ->instance, "\n";
print "cell      = ", $princ->cell, "\n";
print "principal = ", $princ->principal, "\n";

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

# 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");
  }

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


=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

src/AFS.pm  view on Meta::CPAN

require DynaLoader;

use vars qw(@ISA $VERSION);

@ISA = qw(Exporter AutoLoader DynaLoader);

$VERSION = 'v2.6.4';

@CELL = qw (
            configdir
            expandcell
            getcell
            getcellinfo
            localcell
           );

@MISC = qw (
            afsok
            checkafs
            setpag
           );

src/AFS.pm  view on Meta::CPAN

# convenience functions
#sub newacl { use AFS::ACL; AFS::ACL->new(@_); }
sub newacl { require AFS::ACL; AFS::ACL->import; AFS::ACL->new(@_); }

sub newpts { AFS::PTS->_new(@_); }

sub newprincipal { AFS::KTC_PRINCIPAL->_new(@_); }
sub ktc_principal { AFS::KTC_PRINCIPAL->_new(@_); }

sub ka_LocalCell { return &localcell; }
sub ka_ExpandCell { expandcell($_[0]); }
sub ka_CellToRealm { uc(expandcell($_[0])); }

sub afsok { $AFS::CODE == 0; }
sub checkafs { die "$_[0]: $AFS::CODE" if $AFS::CODE; }
sub get_server_version {
    my $server   = shift;
    my $hostname = shift;
    my $verbose  = shift;

    my %port = (
                'fs'  => 7000,

src/AFS.xs  view on Meta::CPAN


    if (!cdir) {
        *code = errno;
        SETCODE(code);
/*         printf("bos DEBUG-4\n"); */
        return NULL;
    }

    struct afsconf_cell info;

    /* next call expands cell name abbrevs for us and handles looking up
     * local cell */
    *code = internal_GetCellInfo(tname, (char *) 0, &info);
    if (*code) {
        char buffer[256];
        sprintf(buffer, "AFS::BOS %d (can't find cell '%s' in cell database)",
                *code, (tname ? tname : "<default>"));
        BSETCODE(code, buffer);
        /*             printf("bos DEBUG-5\n"); */
        return NULL;
    }

src/AFS.xs  view on Meta::CPAN

        int32 code;

        code = setpag();
        SETCODE(code);
        RETVAL = (code == 0);
    }
    OUTPUT:
        RETVAL

void
afs_expandcell(cell)
        char *  cell
    PPCODE:
    {
        int32 code;
        struct afsconf_cell info;

        if (cell && (cell[0] == '\0' || cell[0] == '0'))
            cell = NULL;

        code = internal_GetCellInfo(cell, 0, &info);

src/Cell/Cell.pm  view on Meta::CPAN

#------------------------------------------------------------------------------

use AFS;

use vars qw(@ISA $VERSION @EXPORT_OK);

require Exporter;

@EXPORT_OK = qw(
                configdir
                expandcell
                getcellinfo
                localcell
                whichcell
                wscell
               );
@ISA     = qw(Exporter AFS);
$VERSION = 'v2.6.4';

1;

src/Cell/t/Cell.t  view on Meta::CPAN

use lib qw(../../inc ../inc);
use blib;

use Test::More;

BEGIN {
    use AFS::FS;
    if (AFS::FS::isafs('./')) { plan tests => 8; }
    else { plan skip_all => 'Working directory is not in AFS file system ...'; }

    use_ok('AFS::Cell', qw (configdir expandcell
                            getcellinfo localcell
                            whichcell wscell
                           )
          );
}

my $conf_dir = configdir;
ok(defined $conf_dir, 'configdir ');

my $cell = localcell;
ok(defined $cell, 'localcell');

ok($cell eq expandcell($cell), 'expandcell');

ok($cell eq whichcell("/afs/$cell"), 'whichcell');

ok($cell eq wscell, 'wscell');

my ($Cell, @hosts) = getcellinfo;
ok($Cell eq localcell, 'getcellinfo(cell) ');
ok($#hosts ge 0, 'getcellinfo(hosts) ');

src/KAS/KAS.pm  view on Meta::CPAN

#
# sub LocalCell {
#     my $class  = shift;

#     AFS::localcell;
# }

# sub ExpandCell {
#     my $class  = shift;

#     AFS::expandcell(@_);
# }

# sub CellToRealm {
#     my $class  = shift;

#     uc(AFS::expandcell(@_));
# }

sub DESTROY {
    my (undef, undef, undef, $subroutine) = caller(1);
    if (! defined $subroutine or $subroutine !~ /eval/) { undef $_[0]; }  # self->DESTROY
    else { AFS::KAS::_DESTROY($_[0]); }                                   # undef self
}

sub AuthServerConn {
    my $class = shift;



( run in 0.677 second using v1.01-cache-2.11-cpan-97f6503c9c8 )