AFS

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN

    appreciate a note to tell me how you got on. Although I am
    particularly interested to hear about any problems you encounter
    when building the system, I would still like to hear from you even
    if you don't.

    Things I particularly would like to know

       * The Operating system name and version, e.g. SunOS 4.1.3
       * Architecture, e.g. Solaris
       * C compiler, e.g. gcc
       * Where there any warnings/errors printed by the C compiler? If so
         please send the exact output if possible.
       * The Perl version
       * The version of the AFS system libraries


KNOWN PROBLEMS
    Under SunOS, several people have encountered problems while compiling
    and installing the AFS module bundle.


INSTALL_64  view on Meta::CPAN

    appreciate a note to tell me how you got on. Although I am
    particularly interested to hear about any problems you encounter
    when building the system, I would still like to hear from you even
    if you don't.

    Things I particularly would like to know

       * The Operating system name and version, e.g. SunOS 4.1.3
       * Architecture, e.g. Solaris
       * C compiler, e.g. gcc
       * Where there any warnings/errors printed by the C compiler? If so
         please send the exact output if possible.
       * The Perl version
       * The version of the AFS system libraries


KNOWN PROBLEMS
    Under SunOS, several people have encountered problems while compiling
    and installing the AFS module bundle.


LICENCES/COPYING  view on Meta::CPAN

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

examples/v2/acl/apply  view on Meta::CPAN

use blib;
use strict;
use warnings;

use AFS::ACL;

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

my $acl = AFS::ACL->new({ 'guest', AFS::ACL->crights('read')});
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

my $ok = $acl->apply($dir);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "ok = $ok\n"; }

examples/v2/acl/ascii2rights  view on Meta::CPAN


use blib;
use strict;
use warnings;

use AFS::ACL;

die "Usage: $0 rights \n" if $#ARGV != 0;

my $rights = shift;
print "Flag($rights) = ", AFS::ACL->ascii2rights($rights), "\n";
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

examples/v2/acl/cleanacl  view on Meta::CPAN

use strict;
use warnings;

use AFS::ACL;

die "Usage: $0 path\n" if ($#ARGV==-1);

my $path = shift;

my $ok = AFS::ACL->cleanacl($path);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

examples/v2/acl/copyacl  view on Meta::CPAN

use warnings;

use AFS::ACL;

die "Usage: $0 from to\n" if ($#ARGV==-1);

my $from = shift;
my $to = shift;

my $ok = AFS::ACL->copyacl($from, $to);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

exit;

examples/v2/acl/crights  view on Meta::CPAN


use blib;
use strict;
use warnings;

use AFS::ACL;

die "Usage: $0 rights\n" if $#ARGV != 0;

my $rights = shift;
print "Rights($rights) = ", AFS::ACL->crights($rights), "\n";
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

examples/v2/acl/is_clean  view on Meta::CPAN

use strict;
use warnings;

use AFS::ACL;

die "Usage: $0 path\n" if ($#ARGV==-1);

my $path = shift;

my $acl = AFS::ACL->retrieve($path);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else {
    my $ok  = $acl->is_clean($path);
    if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
    else            { print "$path = ", $ok == 1 ? "clean\n" : "unclean\n"; }
}

examples/v2/acl/modifyacl  view on Meta::CPAN

use warnings;

use AFS::ACL;

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

system "fs la $dir";

my $new_acl = AFS::ACL->new({ 'guest', AFS::ACL->crights('all')});
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

my $ok = $new_acl->modifyacl($dir);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

system "fs la $dir";

$new_acl->set('guest', 'none');

$ok = $new_acl->modifyacl($dir);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

system "fs la $dir";

examples/v2/acl/retrieve  view on Meta::CPAN

use blib;
use strict;
use warnings;

use AFS::ACL;

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

my $acl = AFS::ACL->retrieve($path);
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else {
    print "Normal rights: \n" if ($acl->length);
    foreach my $user ($acl->get_users) {
        print " $user ",$acl->get_rights($user),"\n";
    }

    print "Negative rights: \n" if ($acl->nlength);
    foreach my $user ($acl->nget_users) {
        print " $user ",$acl->nget_rights($user),"\n";
    }
}

examples/v2/acl/rights2ascii  view on Meta::CPAN


use blib;
use strict;
use warnings;

use AFS::ACL;

die "Usage: $0 flag \n" if $#ARGV != 0;

my $flag = shift;
print "Rights($flag) = ", AFS::ACL->rights2ascii($flag), "\n";
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

examples/v2/base/constant  view on Meta::CPAN


use blib;
use strict;
use warnings;

use AFS qw (constant);

my $value;

$value = constant('PRIDEXIST'); # value = 267265
print "Value constant = $value \n";

$value = &AFS::PRIDEXIST;       # value = 267265, preferred method
print "Value function = $value \n";

$value = constant('VBUSY'); # value = 110
print "Value constant = $value \n";

$value = &AFS::VBUSY;       # value = 110, preferred method
print "Value function = $value \n";

# print "AFS::PRSUCCESS  = ",&AFS::PRSUCCESS ,"\n";
# print "AFS::PR_MAXNAMELEN  = ",&AFS::PR_MAXNAMELEN ,"\n";
# print "AFS::PR_MAXGROUPS  = ",&AFS::PR_MAXGROUPS ,"\n";
# print "AFS::PR_MAXLIST  = ",&AFS::PR_MAXLIST ,"\n";
# print "AFS::PRSIZE  = ",&AFS::PRSIZE ,"\n";
# print "AFS::COSIZE  = ",&AFS::COSIZE ,"\n";
# print "AFS::PR_SF_ALLBITS  = ",&AFS::PR_SF_ALLBITS ,"\n";
# print "AFS::PR_SF_NGROUPS  = ",&AFS::PR_SF_NGROUPS ,"\n";
# print "AFS::PR_SF_NUSERS   = ",&AFS::PR_SF_NUSERS  ,"\n";
# print "AFS::PR_LOWEST_OPCODE   = ",&AFS::PR_LOWEST_OPCODE  ,"\n";
# print "AFS::PR_HIGHEST_OPCODE  = ",&AFS::PR_HIGHEST_OPCODE ,"\n";
# print "AFS::PR_NUMBER_OPCODES  = ",&AFS::PR_NUMBER_OPCODES ,"\n";
# print "AFS::PREXIST  = ",&AFS::PREXIST ,"\n";
# print "AFS::PRIDEXIST  = ",&AFS::PRIDEXIST ,"\n";
# print "AFS::PRNOIDS  = ",&AFS::PRNOIDS ,"\n";
# print "AFS::PRDBFAIL  = ",&AFS::PRDBFAIL ,"\n";
# print "AFS::PRNOENT  = ",&AFS::PRNOENT ,"\n";
# print "AFS::PRPERM  = ",&AFS::PRPERM ,"\n";
# print "AFS::PRNOTGROUP  = ",&AFS::PRNOTGROUP ,"\n";
# print "AFS::PRNOTUSER  = ",&AFS::PRNOTUSER ,"\n";
# print "AFS::PRBADNAM  = ",&AFS::PRBADNAM ,"\n";
# print "AFS::PRBADARG  = ",&AFS::PRBADARG ,"\n";
# print "AFS::PRNOMORE  = ",&AFS::PRNOMORE ,"\n";
# print "AFS::PRDBBAD  = ",&AFS::PRDBBAD ,"\n";
# print "AFS::PRGROUPEMPTY  = ",&AFS::PRGROUPEMPTY ,"\n";
# print "AFS::PRINCONSISTENT  = ",&AFS::PRINCONSISTENT ,"\n";
# print "AFS::PRDBADDR  = ",&AFS::PRDBADDR ,"\n";
# print "AFS::PRTOOMANY  = ",&AFS::PRTOOMANY ,"\n";
# print "AFS::PRBADID  = ",&AFS::PRBADID ,"\n";
# print "AFS::SYSADMINID  = ",&AFS::SYSADMINID ,"\n";
# print "AFS::SYSBACKUPID  = ",&AFS::SYSBACKUPID ,"\n";
# print "AFS::ANYUSERID  = ",&AFS::ANYUSERID ,"\n";
# print "AFS::AUTHUSERID  = ",&AFS::AUTHUSERID ,"\n";
# print "AFS::ANONYMOUSID  = ",&AFS::ANONYMOUSID ,"\n";
# print "AFS::PRDBVERSION  = ",&AFS::PRDBVERSION ,"\n";

# print "AFS::PRSFS_READ = ",&AFS::PRSFS_READ,"\n";
# print "AFS::PRSFS_WRITE = ",&AFS::PRSFS_WRITE,"\n";
# print "AFS::PRSFS_INSERT = ",&AFS::PRSFS_INSERT,"\n";
# print "AFS::PRSFS_LOOKUP = ",&AFS::PRSFS_LOOKUP,"\n";
# print "AFS::PRSFS_DELETE = ",&AFS::PRSFS_DELETE,"\n";
# print "AFS::PRSFS_LOCK = ",&AFS::PRSFS_LOCK,"\n";
# print "AFS::PRSFS_ADMINISTER = ",&AFS::PRSFS_ADMINISTER,"\n";
# print "AFS::PRSFS_USR0 = ",&AFS::PRSFS_USR0,"\n";
# print "AFS::PRSFS_USR1 = ",&AFS::PRSFS_USR1,"\n";
# print "AFS::PRSFS_USR2 = ",&AFS::PRSFS_USR2,"\n";
# print "AFS::PRSFS_USR3 = ",&AFS::PRSFS_USR3,"\n";
# print "AFS::PRSFS_USR4 = ",&AFS::PRSFS_USR4,"\n";
# print "AFS::PRSFS_USR5 = ",&AFS::PRSFS_USR5,"\n";
# print "AFS::PRSFS_USR6 = ",&AFS::PRSFS_USR6,"\n";
# print "AFS::PRSFS_USR7 = ",&AFS::PRSFS_USR7,"\n";

examples/v2/base/error_test  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS qw (error_message);

print error_message(&AFS::PRNOMORE),"\n";
print error_message(180502),"\n";
print error_message(0),"\n";
print error_message(13),"\n";

examples/v2/bos/addhost  view on Meta::CPAN

$host     = shift;
$clone    = shift;
$server   = shift;
$cellname = shift // '';

if (defined $clone and !looks_like_number($clone)) { warn "$0: CLONE is not an INTEGER ...\n"; }
else                                                   { $clone = int($clone); }

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

@hosts = split (/ /, $host);
my $ok = $bos->addhost(\@hosts, $clone);
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);

$bos->DESTROY;

examples/v2/bos/addkey  view on Meta::CPAN


my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

die "not yet tested ... \n";

print "bos->addkey()...\n";

my $ok = $bos->addkey(2); # kvno = 2
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);
print "Something went wrong\n" unless $ok;

$ok = $bos->addkey(3, 'I will not tell you'); # kvno = 3
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);
print "Something went wrong\n" unless $ok;

$bos->DESTROY;

examples/v2/bos/adduser  view on Meta::CPAN

my (@users, $user, $server, $cellname, $bos);

die "Usage: $0 user server [cell]\n" if $#ARGV < 1;

$user     = shift;
$server   = shift;
$cellname = shift // '';

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

@users = split (/ /, $user);
my $ok = $bos->adduser(\@users);
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);

$bos->DESTROY;

examples/v2/bos/blockscanner  view on Meta::CPAN


my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my $ok = $bos->exec('/usr/afs/bin/scanner -block');
print "Start Block Scanner OK-Status: $ok \n";

$ok = $bos->exec('/usr/afs/bin/scanner -noblock');
print "Start Unblock Scanner OK-Status: $ok \n";

$bos->DESTROY;

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


my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK \n"; }

test_it($bos);

sub test_it {
    my $self = shift;
    $self->DESTROY;
}

examples/v2/bos/create  view on Meta::CPAN

$server   = shift;
$process  = shift;
$type     = shift;
$commands = shift;
$notifier = shift;

#warn ">$server< >$process< >$type< >$commands< >$notifier< \n";
if (defined $commands and $commands =~ / /) { @commands = split / /, $commands; }

$bos = AFS::BOS->new($server);
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

if (@commands) {
    if ($notifier) { $ok = $bos->create($process, $type, \@commands, $notifier); }
    else           { $ok = $bos->create($process, $type, \@commands); }
}
else {
    if ($notifier) { $ok = $bos->create($process, $type, $commands, $notifier); }
    else           { $ok = $bos->create($process, $type, $commands); }
}
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

$bos->DESTROY;

examples/v2/bos/delete  view on Meta::CPAN

$server   = shift;
$instance = shift;
$cellname = shift if $nargs > 1;

#warn ">$server< >$instance< >$cellname< \n";

if (defined $instance and $instance =~ / /) { @instance = split / /, $instance; }

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

if    (@instance) { $ok = $bos->delete(\@instance); }
elsif ($instance) { $ok = $bos->delete($instance); }
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

$bos->DESTROY;

examples/v2/bos/exec  view on Meta::CPAN

my ($server, $command, $cellname, $bos);

die "Usage: $0 server command [cell]\n" if $#ARGV < 1;

$server   = shift;
$command  = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my $ok = $bos->exec($command);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK-Status: $ok \n"; }

$bos->DESTROY;

examples/v2/bos/getlog  view on Meta::CPAN

my ($server, $cellname, $logfile, $bos);

die "Usage: $0 server [cell] log_file_name \n" if $#ARGV < 1;

$server   = shift;
$cellname = shift if $#ARGV == 2;
$logfile  = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

print "Fetching log file \'$logfile\' ...\n";
my @log = $bos->getlog($logfile);
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

print join('', @log);

$bos->DESTROY;

examples/v2/bos/getrestart  view on Meta::CPAN


my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my ($generalTime, $newBinaryTime) = $bos->getrestart;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

print "Server $server restarts $generalTime\n";
print "Server $server restarts for new binaries $newBinaryTime\n";

$bos->DESTROY;

examples/v2/bos/getrestricted  view on Meta::CPAN


my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my $mode = $bos->getrestricted;
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "Current restricted mode is '$mode'\n"; }

$bos->DESTROY;

examples/v2/bos/listhosts  view on Meta::CPAN


my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my ($cell, $hostlist) = $bos->listhosts;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

if (defined $cell) { print "Cell name is $cell\n"; }

if (defined $$hostlist[0]) {
    my $i = 1;
    foreach (@$hostlist) {
        print "\tHost $i is $_ \n";
        $i++;
    }
}

$bos->DESTROY;

examples/v2/bos/listkeys  view on Meta::CPAN

my ($server, $cellname, $bos, $lastmod, $keylist, $show);

die "Usage: $0 server [show [cell]]\n" if $#ARGV < 0;

$server   = shift;
$show     = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

if ($show) { ($lastmod, $keylist) = $bos->listkeys($show); }
else       { ($lastmod, $keylist) = $bos->listkeys; }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

if ($keylist) {
    foreach my $key (keys %{$keylist}) {
        print "Key with kvno $key:\n";
        foreach (keys %{$keylist->{$key}}) {
            if ($_ eq 'key') { print_key($keylist->{$key}->{$_}); }
            else { print "\tkey: $_, Value: '$keylist->{$key}->{$_}'\n"; }
        }
    }
}

chomp($lastmod = strftime('%d %b %R %Y', localtime($lastmod)));
print "Keys last changed on $lastmod\n";
print "All done.\n";

$bos->DESTROY;

sub print_key {
    my $key = shift;

    print "key is: ";
    my (@val) = unpack("C*", $key);
    foreach (@val) { printf("\\%o", $_); }
    print "\n";
}

examples/v2/bos/listusers  view on Meta::CPAN


my ($server, $cellname, $bos);

die "Usage: $0 server [cell]\n" if $#ARGV < 0;

$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my @users = $bos->listusers;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

if (defined $users[0]) {
    print "SUsers are: ", join(' ', @users), "\n";
}

$bos->DESTROY;

examples/v2/bos/prune  view on Meta::CPAN


my $nargs = $#ARGV;
$server   = shift;
$cellname = shift if $nargs == 2;
$what     = shift if $nargs >  0;

$what = '' unless $what;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

if ($what eq 'all') {
    # warn "prune all \n";
    $ok = $bos->prune(1);      # delete ALL (.BAK, .OLD, CORE) files
}
elsif ($what eq 'bak') {
    # warn "prune bak \n";
    $ok = $bos->prune(0, 1);    # delete .BAK files
}
elsif ($what eq 'old') {

examples/v2/bos/prune  view on Meta::CPAN

    $ok = $bos->prune(0, 0, 1);    # delete .OLD files
}
elsif ($what eq 'core') {
    # warn "prune core \n";
    $ok = $bos->prune(0, 0, 0, 1);    # delete CORE files
}
else {
    # warn "prune nothing \n";
    $ok = $bos->prune;      # nothing specified ... give error message
}
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);
#print "Status: $ok \n";

$bos->DESTROY;

examples/v2/bos/removehost  view on Meta::CPAN

my (@hosts, $host, $server, $cellname, $bos);

die "Usage: $0 host server [cell]\n" if $#ARGV < 1;

$host     = shift;
$server   = shift;
$cellname = shift // '';

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

@hosts = split (/ /, $host);
my $ok = $bos->removehost(\@hosts);
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);

$bos->DESTROY;



( run in 1.010 second using v1.01-cache-2.11-cpan-de7293f3b23 )