AFS

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN




Version 2.4.0 (released 20 Feb 2006, revision 777)

 NOTICE:
 * This release does not support AFS system libraries version 3.4 or
   version 3.5

 User-visible changes:
 * implementation of most commands of the BOS command suite
 * POD documentation for the module AFS::BOS
 * compiles now with OpenAFS 1.4 system libraries
 * improved several test drivers;
 * fixed method AFS::VOS->listvolume: returns volume name when
   volume id number is given
 * patched function fs_getquota
 * improved POD documentation for AFS::VOS


 Developer-visible changes:

CHANGES  view on Meta::CPAN





Version 2.2.0 (released 03 February 2004, revision 571)

 NOTICE: This release does not support AFS system libraries
         version 3.4 or version 3.5

 User-visible changes:
 * implementation of the VOS command suite
 * POD documentation for the modules AFS::VLDB and AFS::VOS
 * changed VERSION numbering schema.  Beginning with version 2.2.0,
   the version number convention has been changed to a "dotted
   integer" scheme that is more commonly found in open source
   projects.  Maintenance versions of v2.2.0 will be released as
   v2.2.1, v2,2.2 etc.  The next development series following v2.2.0
   will be numbered v2.3.x, beginning with v2.3.0, and the next major
   production release following v2.2.0 will be v2.4.0.
 * improved Makefile.PL script
 * improved several test drivers by generalizing test cases.

INSTALL  view on Meta::CPAN


    'cd' into that directory, make, test and install the modules.

    You have to specify the location of the AFS system
    libraries. While running the 'perl Makefile.PL' step you will be
    prompted for the location of the AFS system libraries.  If you
    want to avoid that query, you should specify the environment
    variable 'AFSPATH' before you start [1].

    If your AFS system type is not yet known by the make file because
    you can't run the "fs sysname" command, you can specify the
    environment variable 'AFS_SYSNAME' before you start [2].

    This is the sequence of commands to build the modules:

        cd AFS-<version>

        [1] this step is optional
        setenv AFSPATH 'path_to_the_AFS_system_libraries' # tcsh-shell
        export AFSPATH='path_to_the_AFS_system_libraries' # sh-shell

        [2] this step is optional
        setenv AFS_SYSNAME 'AFS_system_type'              # tcsh-shell
        export AFS_SYSNAME 'AFS_system_type'              # sh-shell

INSTALL_64  view on Meta::CPAN

        * OpenAFS system libraries 64-bit version (PIC type or standard)


WHAT TYPE OF OpenAFS SYSTEM LIBRARIES ARE NEEDED
    Depending on the installed Perl version you have to use the proper
    type of OpenAFS system libraries. If you have a "threaded" version
    of Perl, you have to link the AFS modules against the PIC type
    system libraries, for a "non-threaded" Perl you have to use the
    standard libraries.

    To find out what type of Perl you are using, just run the command:

       perl ./test_ptype

    If it says
                'Your Perl is 'Non-Threaded Perl'
    then you need the standard system libraries and you can skip to
    the next section (BUILDING & INSTALLING).

    If it says
                Your Perl is 'Threaded Perl'
    then you need the PIC type system libraries.  Unfortunately the
    PIC type system libraries are not created for OpenAFS 1.4.X by
    default.  Therefore you have to patch your OpenAFS installation.

    This is the sequence of commands to build the PIC type system libraries:

        gunzip AFS-<version>.tar.gz
        tar xvf AFS-<version>.tar
        cd openafs-1.4.X
        patch < AFS-<version>/openafs-pic.patch
        make clean
        make
        make install

    Now you have created the additional PIC type system libraries for

INSTALL_64  view on Meta::CPAN


    'cd' into that directory, make, test and install the modules.

    You have to specify the location of the AFS system
    libraries. While running the 'perl Makefile.PL' step you will be
    prompted for the location of the AFS system libraries.  If you
    want to avoid that query, you should specify the environment
    variable 'AFSPATH' before you start [1].

    If your AFS system type is not yet known by the make file because
    you can't run the "fs sysname" command, you can specify the
    environment variable 'AFS_SYSNAME' before you start [2].

    This is the sequence of commands to build the modules:

        cd AFS-<version>

        [1] this step is optional
        setenv AFSPATH 'path_to_the_AFS_system_libraries' # tcsh-shell
        export AFSPATH='path_to_the_AFS_system_libraries' # sh-shell

        [2] this step is optional
        setenv AFS_SYSNAME 'AFS_system_type'              # tcsh-shell
        export AFS_SYSNAME 'AFS_system_type'              # sh-shell

LICENCES/COPYING  view on Meta::CPAN

above, provided that you also meet all of these conditions:

    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.)


LICENCES/COPYING  view on Meta::CPAN

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) 19yy name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

README  view on Meta::CPAN


This is the README file for the Perl extension module bundle AFS (Version v2.6.4)


DESCRIPTION
    The AFS module bundle is a dynamically loadable extension to Perl.
    It gives the AFS user and AFS administrator access to many of the
    AFS programming APIs, allowing them to make these calls directly from
    Perl, rather than processing the output of a command.


WHAT'S NEW?
    Version v2.6.4 is just a bug fixing release.
    For more details, please see the file named 'CHANGES' which should
    have been included in the AFS module distribution.


RESTRICTIONS
    This release

README  view on Meta::CPAN

    the AFS modules.  However I do not guarantee these scripts to
    work.


COMPATIBILITY
    This release does NOT support any features and interfaces from Perl
    AFS modules major version 1.


CAVEATS
    A few methods from the AFS command suite BOS are not yet
    released.  For details, please see 'AFS::BOS.pod'.


BUGS
    Development questions, bug reports, and patches should be sent to
    Norbert E Gruener <nog@MPA-Garching.MPG.de>.

    Bug reports are also welcome at
    <http://rt.cpan.org/NoAuth/Bugs.html?Dist=AFS>.

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

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::BOS;

my ($server, $process, $type, $commands, @commands, $notifier, $bos, $ok);

die "Usage: $0 server process type commands [notifier]\n" if $#ARGV < 3;

$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/exec  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::BOS;

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/status  view on Meta::CPAN

        print "currently running normally.\n" if $status->{$inst}->{status};
        print "\tAuxiliary status is: $status->{$inst}->{aux_status}\n" if $status->{$inst}->{aux_status};
        chomp($laststart = strftime('%d %b %R %Y', localtime($status->{$inst}->{procStartTime})));
        chomp($lastexit  = strftime('%d %b %R %Y', localtime($status->{$inst}->{lastAnyExit})));
        print "\tProcess last started at $laststart\n";
        print "\tLast exit at $lastexit\n";

        foreach my $val (keys %{$status->{$inst}}) {
            if ($val eq 'status') { next; }
            elsif ($val eq "aux_status") { next; }
            elsif ($val eq "command") {
                foreach (@{$status->{$inst}->{$val}}) {
                    print "\tCommand is $_\n";
                }
            }
        }
    }
}


my $Debugging = 0;

if ($Debugging) {
    print "\n\n\nDEBUG\n\n";
    if ($status) {
        foreach my $inst (keys %$status) {
            print "Instance: $inst\n";
            foreach my $val (keys %{$status->{$inst}}) {
                if ($val eq "command") {
                    print "\tKey: $val\n";
                    foreach (@{$status->{$inst}->{$val}}) {
                        print "\t\tValue: $_\n";
                    }
                }
                else {
                    print "\tKey: $val, Value: $status->{$inst}->{$val}\n";
                }
            }
        }

pod/v2/README  view on Meta::CPAN

    be used by the 'perldoc' program, and may be used to generate HTML
    documentation usable by WWW browsers, and documentation in several
    other formats.


GENERATING HTML DOCUMENTATION
    If you have some WWW browser available, it might be worthwhile to
    build HTML docs.  Unfortunately the perl Makefile.PL
    infrastructure won't do this for you automatically.  You have to
    generate it explicitly.  'cd' into the top directory and 'make'
    the HTML documentation.  This is the sequence of commands to build
    the docs:

        cd AFS-2.6.4
        perl Makefile.PL  ;#(if you have not submitted already)
        make html

    After this you can start your browser with the file 

            AFS-2.6.4/lib/AFS.html

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

=head1 COMPATIBILITY

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

=head1 DESCRIPTION

The AFS module bundle is a dynamically loadable (where available)
extension to Perl.  It gives the AFS user and administrator access to
most of the AFS programming APIs, allowing you to make these calls
directly from Perl, rather than processing the output of a command.

The AFS module bundle is a thin layer above the low-level AFS APIs. When
possible, function names are similar to the actual API names, or to the
AFS command suite names. The ordering of function parameters is not
always the same though.

The AFS module bundle includes the following features:

=over 4

=item * Access to Basic Overseer Server routines

Methods that deal with the Basic Overseer Server (i.e, the I<bos>
command suite).  See L<AFS::BOS>.

=item * Access to Volume Server routines

Methods that deal with the Volume Server (i.e, part of the I<vos>
command suite).  See L<AFS::VOS>.

=item * Access to Volume Location Server routines

Methods that deal with the Volume Location Server (i.e, part of the
I<vos> command suite).  See L<AFS::VLDB>.

=item * Access to File Server routines

Functions that deal with the File Server (i.e, part of the I<fs>
command suite).  See L<AFS::FS>.

=item * Access to Cache Manager routines

Functions that deal with the Cache Manager (i.e, part of the I<fs>
command suite).  See L<AFS::CM>.

=item * Managing Access Control Lists

Methods to control access to directories and all of their files. (i.e,
part of the I<fs> command suite). See L<AFS::ACL>.

=item * Manipulations of the Cell Configuration

Functions that deal with Cell Configurations (i.e, part of the I<fs>
command suite).  See L<AFS::CELL>.

=item * Access to Protection Server routines

Methods that deal with the Protection Server (i.e, the I<pts> command
suite).  See L<AFS::PTS>.

=item * Access to the Authentication Server routines

Methods that deal with the Authentication Server (i.e, the I<kas>
command suite).  See L<AFS::KAS>.

=item * Access to the AFS structure ktc_token

Methods that deal with token management in the I<Kernel Token Cache>
(KTC) (i.e, the tokens command).  See L<AFS::KTC_TOKEN>.

=item * Access to the AFS structure ktc_principal

Methods that deal with principals related to tokens.  See L<AFS::KTC_PRINCIPAL>.

=item * Access to the AFS structure ktc_encryptionkey

Methods that deal with encryption keys related to tokens.  See
L<AFS::KTC_EKEY>.

=item * Access to shared utility routines

Utility functions for the AFS module bundle which are not part of any
AFS command suite (i.e, the setpag command).  See L<AFS::Utils>.

=item * Access to basic AFS functions and to AFS error codes

Basic functions like raising a Perl exception when any AFS function call
fails (useful for debugging) or retrieving the status value of the last
AFS function call. See L<AFS::Base>.

=back

=head1 PREREQUISITES

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

=back

=head1 SEE ALSO

=over 4

=item OpenAFS documentations

=item OpenAFS source tree

=item AFS command suites (fs, pts, kas, bos, and vos)

=back

=head1 CAVEATS

These modules and their POD documentations have been written with the
help of the AFS source code, the AFS manuals, and the 'ancient' AFS
Programmer's Reference documentation.  Unfortunately nearly no
documentation was available for the interfaces to the AFS structures
ktc_token, ktc_principal, and ktc_encryptionkey.  Therefore these

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

=item B<$bos = AFS::BOS-E<gt>new(SERVER [, NOAUTH [, LOCALAUTH [, CELL [, ENCRYPT]]]]);>

Creates a new object of the class AFS::BOS and establishes a
connection to the Basic Overseer Server running on the SERVER machine.
An AFS::BOS object is essentially a handle to talk to the Basic
Overseer Server.  Internally an AFS::BOS object is a pointer to a
rx_connection structure, although this may change and the value
returned from AFS::BOS::new should always be treaded as an opaque
handle.

Set LOCALAUTH (default 0) to 1 only when issuing a command on a server
machine.  If NOAUTH is 1 (default 0) it establishes an unauthenticated
connection to the server, in which the server treats the issuer as an
unprivileged user.  CELL (default NULL) specifies the cell in which to
run the command.  Set ENCRYPT (default 1) to 0 if you want to use an
unencrypted connection. HANDLE WITH CARE!

=item B<DESTRUCTOR>

=item S< >

=item B<$bos-E<gt>DESTROY;>

Destroys the connection to the Basic Overseer Server and frees the
rx_connection structure.

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


=item B<$ok = $bos-E<gt>create(PROCESS, TYPE, COMMAND [, NOTIFIER]);>

=item B<$ok = $bos-E<gt>create(PROCESS, TYPE, \@COMMAND [, NOTIFIER]);>

Creates a server PROCESS entry in the local C<BosConfig> file on the
server machine, sets the process's status to I<Run> in the
C<BosConfig> file and in memory, and starts the process.  TYPE
specifies the process's type. Acceptable values are: 'simple', 'cron',
and 'fs'.  COMMAND is either a scalar value or an array reference
containing the commands the BOS Server should run to start the
process.  NOTIFIER specifies the complete pathname of a program that
the BOS Server invokes when the process terminates.  It calls the AFS
system library function I<BOZO_CreateBnode>.

=item B<$ok = $bos-E<gt>delete(INSTANCE);>

=item B<$ok = $bos-E<gt>delete(\@INSTANCE);>

Deletes the entry INSTANCE from the local C<BosConfig> file.  INSTANCE
is either a scalar value or a reference to an array of instance names.

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


  my $sysname = sysname;

  unlog;

=head1 DESCRIPTION

This module provides several utility functions for the B<AFS module
bundle>.  You can retrieve the version number for the underlying AFS
system libraries, for the XS module, and for the AFS server processes.
And it contains several commands that do not belong to any AFS command
suites like creating a new PAG or retrieving and setting the
CPU/operating system type. Any function required must by explicitly
listed by the C<use> statement to be exported into the calling package.

=head1 COMPATIBILITY

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

=head1 EXPORTS

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

Reports the version number of the SERVER process running at HOST
(default localhost). If VERBOSE (default 0) is set to 1 some program
trace is printed.

=item B<$version = get_syslib_version;>

Reports the version number of the underlying AFS system library.

=item B<$ok = setpag;>

Creates a new command shell (owned by the issuer of the command) and
associates a new process authentication group (PAG) with the shell and
the user. A PAG is a number guaranteed to identify the issuer of
commands in the new shell uniquely to the local Cache Manager.

=item B<$sysname = sysname([NEWSYSNAME]);>

Reports the CPU/operating system type or sets the CPU/operating system
type to NEWSYSNAME.

=item B<unlog;>

Discards all of the issuer's tokens.

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

Creates a new object of the class AFS::VLDB.  An AFS::VLDB object is
essentially a handle to talk to the Volume Location Server.
Internally an AFS::VLDB object is a pointer to a ubik_client
structure, although this may change and the value returned from
AFS::VLDB::new should always be treaded as an opaque handle.

Set VERBOSE (default 0) to 1 to produce on the standard output stream
a detailed trace of the method's execution.  TIMEOUT is the time of
inactivity in seconds before the connection to the VLDB server is
declared dead (default 90 seconds).  Set LOCALAUTH (default 0) to 1
only when issuing a command on a server machine.  If NOAUTH is 1
(default 0) it establishes an unauthenticated connection to the
server, in which the servers treat the issuer as an unprivileged user.
CELL (default NULL) specifies the cell in which to run the
command. Set ENCRYPT to 1 (default 0) to encrypt the connection to the
VLDB server.

=item B<DESTRUCTOR>

=item S< >

=item B<$vldb-E<gt>DESTROY;>

Destroys the ubik connection to the Volume Location Server and frees the
ubik_client structure.

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

Creates a new object of the class AFS::VOS.  An AFS::VOS object is
essentially a handle to talk to the Volume Server.  Internally an
AFS::VOS object is a pointer to a ubik_client structure, although this
may change and the value returned from AFS::VOS::new should always be
treaded as an opaque handle.

Set VERBOSE (default 0) to 1 to produce on the standard output stream
a detailed trace of the method's execution.  TIMEOUT is the time of
inactivity in seconds before the connection to the VOS server is
declared dead (default 90 seconds).  Set LOCALAUTH (default 0) to 1
only when issuing a command on a server machine.  If NOAUTH is 1
(default 0) it establishes an unauthenticated connection to the
server, in which the servers treat the issuer as an unprivileged user.
CELL (default NULL) specifies the cell in which to run the
command. Set ENCRYPT to 1 (default 0) to encrypt the connection to the
VOS server.

=item B<DESTRUCTOR>

=item S< >

=item B<$vos-E<gt>DESTROY;>

Destroys the ubik connection to the Volume Server and frees the
ubik_client structure.

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

=item B<i> if restoring an incremental dump file.

=back

Set OFFLINE (default 0) to 1 to leave restored volume offline.  Set
READONLY (default 0) to 1 to make the restored volume read-only.

If the VOLUME already exists, the OVERWRITE argument is omitted, and
the INTER argument (default 0) is set to 1 the method is interactively
prompting for the type of restore (exactly like the I<vos restore>
command).

It calls the AFS system library function I<UV_RestoreVolume>.

=item B<$ok = $vos-E<gt>setquota(VOLUME, QUOTA [, CLEAR]);>

Sets the QUOTA for the specified volume.  Specify the number of
one-kilobyte blocks as a positive integer (1024 is one megabyte).
VOLUME specifies either the complete name or volume ID number of the
volume.  Set CLEAR (default 0) to 1 to clear the access counter on the
VOLUME, shown on the B<examine> method.  It calls the AFS system

pod/v2/zpod2html  view on Meta::CPAN

#!/usr/local/bin/perl
    eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
	if $running_under_some_shell;

# copy of "pod2html" script taken from Pod::Html module version 1.0504
# to avoid problems with command PATH in the "pod/v2/Makefile"

use Pod::Html;
pod2html @ARGV;

src/AFS.xs  view on Meta::CPAN

{
    croak("%s not implemented on this architecture or under this AFS version", s);
    return -1;
}

int PrintDiagnostics(astring, acode)
    char *astring;
    afs_int32 acode;
{
    if (acode == EACCES) {
        fprintf(STDERR, "You are not authorized to perform the 'vos %s' command (%d)\n",
                astring, acode);
    }
    else {
        fprintf(STDERR, "Error in vos %s command.\n", astring);
        PrintError("", acode);
    }
    return 0;
}
/* end of error handling macros */


/* general helper functions */

static struct afsconf_dir *cdir = NULL;

src/AFS.xs  view on Meta::CPAN


        /* try to display all the parms */
        for (i = 0;; i++) {
            tp = buffer;
            code = BOZO_GetInstanceParm(aconn, aname, i, &tp);
            if (code)
                break;
            /* fprintf(stderr, "    Command %d is '%s'\n", i+1, buffer); */
            av_push(av, newSVpv(buffer, strlen(buffer)));
        }
        safe_hv_store(stats, "command", 7, newRV_inc((SV *) (av)), 0);

        tp = buffer;
        code = BOZO_GetInstanceParm(aconn, aname, 999, &tp);
        if (!code) {
            /* Any type of failure is treated as not having a notifier program */
            /* printf("    Notifier  is '%s'\n", buffer); */
            safe_hv_store(stats, "notifier", 8, newSVpv(buffer, strlen(buffer)), 0);
        }
        /* printf("\n"); */
    }

src/AFS.xs  view on Meta::CPAN

    for (code = 2; code < 6; code++)
        parms[code] = "";
    if (!aparm2)
        aparm2 = "";
    /* MUST pass canonical (wire-format) salvager path to bosserver */
    strncpy(tbuffer, AFSDIR_CANONICAL_SERVER_SALVAGER_FILEPATH, BOZO_BSSIZE);
    if (*aparm2 != 0) {
        if ((strlen(tbuffer) + 1 + strlen(partName) + 1 + strlen(aparm2) + 1) >
            BOZO_BSSIZE) {
            char buffer[256];
            sprintf(buffer, "AFS::BOS: command line too big\n");
            BSETCODE(E2BIG, buffer);
            return (E2BIG);
        }
        strcat(tbuffer, " ");
        strcat(tbuffer, partName);
        strcat(tbuffer, " ");
        strcat(tbuffer, aparm2);
    }
    else {
        if ((strlen(tbuffer) + 4 + strlen(partName) + 1) > BOZO_BSSIZE) {
            char buffer[256];
            sprintf(buffer, "AFS::BOS: command line too big\n");
            BSETCODE(E2BIG, buffer);
            return (E2BIG);
        }
        strcat(tbuffer, " -f ");
        strcat(tbuffer, partName);
    }

    /* add the parallel option if given */
    if (parallel != (char *) 0) {
        if ((strlen(tbuffer) + 11 + strlen(parallel) + 1) > BOZO_BSSIZE) {
            char buffer[256];
            sprintf(buffer, "AFS::BOS: command line too big\n");
            BSETCODE(E2BIG, buffer);
            return (E2BIG);
        }
        strcat(tbuffer, " -parallel ");
        strcat(tbuffer, parallel);
    }

    /* add the tmpdir option if given */
    if (atmpDir != (char *) 0) {
        if ((strlen(tbuffer) + 9 + strlen(atmpDir) + 1) > BOZO_BSSIZE) {
            char buffer[256];
            sprintf(buffer, "AFS::BOS: command line too big\n");
            BSETCODE(E2BIG, buffer);
            return (E2BIG);
        }
        strcat(tbuffer, " -tmpdir ");
        strcat(tbuffer, atmpDir);
    }

    /* add the orphans option if given */
    if (orphans != (char *) 0) {
        if ((strlen(tbuffer) + 10 + strlen(orphans) + 1) > BOZO_BSSIZE) {
            char buffer[256];
            sprintf(buffer, "AFS::BOS: command line too big\n");
            BSETCODE(E2BIG, buffer);
            return (E2BIG);
        }
        strcat(tbuffer, " -orphans ");
        strcat(tbuffer, orphans);
    }

    if (mrafsParm.Optdebug)
        strcat(tbuffer, " -debug");
    if (mrafsParm.Optnowrite)

src/AFS.xs  view on Meta::CPAN

                RETVAL = 0;
                goto done;
            }
            if (!vcode || (Opart != apart))
                vol_elsewhere = 1;

            if (aoverwrite == AFS_ASK) {
                if (strcmp(afilename, "") == 0) {       /* The file is from standard in */
                    char buffer[256];
                    sprintf(buffer,
                            "Volume exists and no OVERWRITE argument specified; Aborting restore command\n");
                    VSETCODE(-1, buffer);
                    RETVAL = 0;
                    goto done;
                }

                /* Ask what to do */
                if (vol_elsewhere) {
                    char buffer[256];
                    sprintf(buffer,
                            "The volume %s %u already exists on a different server/part\n",

src/AFS.xs  view on Meta::CPAN

                if ((c == 'f') || (c == 'F'))
                    aoverwrite = AFS_FULL;
                else if ((c == 'i') || (c == 'I'))
                    aoverwrite = AFS_INC;
                else
                    aoverwrite = AFS_ABORT;
            }

            if (aoverwrite == AFS_ABORT) {
                char buffer[256];
                sprintf(buffer, "Volume exists; Aborting restore command\n");
                VSETCODE(-1, buffer);
                RETVAL = 0;
                goto done;
            }
            else if (aoverwrite == AFS_FULL) {
                restoreflags = RV_FULLRST;
                fprintf(stderr, "Volume exists; Will delete and perform full restore\n");
            }
            else if (aoverwrite == AFS_INC) {
                restoreflags = 0;

src/AFS.xs  view on Meta::CPAN

bos_exec(self, cmd)
        AFS::BOS self
        char *cmd
    PREINIT:
        int32 code = 0;
    CODE:
    {
        code = BOZO_Exec(self, cmd);
        if (code) {
            char buffer[256];
            sprintf(buffer, "AFS::BOS: failed to execute command (%s)\n", em(code));
            BSETCODE(code, buffer);
        }
        SETCODE(code);
        RETVAL = (code == 0);
    }
    OUTPUT:
        RETVAL

int32
bos_addhost(self, object, clone=Nullsv)

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

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

sub create {
    my $self     = shift;
    my $process  = shift;
    my $type     = shift;
    my $command  = shift;
    my $notifier = shift;

    if (! defined $process ||
        ! defined $type    ||
        ! defined $command) {
        carp "AFS::BOS->create: incomplete arguements specified ...\n";
        return 0;
    }

    if (ref($command) eq 'ARRAY') {
        if ($notifier) { $self->_create($process, $type, $command, $notifier); }
        else           { $self->_create($process, $type, $command); }
    }
    elsif (ref($command) eq '' ) {
        my @commands;
        $commands[0] = $command;
        if ($notifier) { $self->_create($process, $type, \@commands, $notifier); }
        else           { $self->_create($process, $type, \@commands); }
    }
    else {
        carp "AFS::BOS->create: not a valid COMMAND input ...\n";
        return 0;
    }
}

sub restart {
    my $self = shift;

src/Makefile.PL  view on Meta::CPAN

else {
    warn("System type '$Config{osname}' not yet tested with this Makefile.PL...\n\n"
         . "Using the default values, which may or may not work\n"
         . "If it is working, please inform the maintainer of this package.\n"
         . "Thank you.\n\n");
}

WriteMakefile(%MakefileArgs);

# change the library name of the AFS system library "util.a"
my $command = "\'s#-lutil#$AFSPath/lib/afs/util.a#\'";
system("perl -p -i.bak -e $command Makefile") unless -f "$AFSPath/lib/afs/libutil.a";

# change the library name of the AFS system library "vlib.a"
# my $command = "\'s#-lvlib#$AFSPath/lib/afs/vlib.a#\'";
# system("perl -p -i.bak -e $command Makefile") unless -f "$AFSPath/lib/afs/libvlib.a";

# change the library name of the AFS system library "libcom_err"
$command = "\'s#-lcom_err#$AFSPath/lib/afs/libcom_err.a#\'";
system("perl -p -i.bak -e $command Makefile");

# change the library name of the AFS system library "-lafsrpc"
if ($alpha_sys =~ /linux/ && $alpha_sys !~ /i386_linux2/) {
    $command = "\'s#-lc -lafsrpc -lc#$AFSPath/lib/libafsrpc_pic.a#g\'";
}
else {
    $command = "\'s#-lc -lafsrpc -lc#$AFSPath/lib/libafsrpc.a#g\'";
}
system("perl -p -i.bak -e $command Makefile");

# change the library name of the AFS system library "-lafsauthent"
if ($alpha_sys =~ /linux/ && $alpha_sys !~ /i386_linux2/) {
    $command = "\'s#-lc -lafsauthent -lc#$AFSPath/lib/libafsauthent_pic.a#g\'";
}
else {
    $command = "\'s#-lc -lafsauthent -lc#$AFSPath/lib/libafsauthent.a#g\'";
}
system("perl -p -i.bak -e $command Makefile");

# make changes to the typemap file if Perl < 5.6.0
$command = "\'s#T_UV#T_IV#\'";
system("perl -p -i.bak -e $command typemap") unless $] >= 5.006;

src/inc/version/vpp.pm  view on Meta::CPAN

	    # Can copy the elements directly
	    $self->{version} = [ @{$value->{version} } ];
	    $self->{qv} = 1 if $value->{qv};
	    $self->{alpha} = 1 if $value->{alpha};
	    $self->{original} = ''.$value->{original};
	    return $self;
	}

	my $currlocale = setlocale(LC_ALL);

	# if the current locale uses commas for decimal points, we
	# just replace commas with decimal places, rather than changing
	# locales
	if ( localeconv()->{decimal_point} eq ',' ) {
	    $value =~ tr/,/./;
	}

	if ( not defined $value or $value =~ /^undef$/ ) {
	    # RT #19517 - special case for undef comparison
	    # or someone forgot to pass a value
	    push @{$self->{version}}, 0;
	    $self->{original} = "0";

src/ppport.h  view on Meta::CPAN

calloc||5.007002|n
cando|||
cast_i32||5.006000|
cast_iv||5.006000|
cast_ulong||5.006000|
cast_uv||5.006000|
check_locale_boundary_crossing|||
check_type_and_open|||
check_uni|||
check_utf8_print|||
checkcomma|||
ckWARN|5.006000||p
ck_entersub_args_core|||
ck_entersub_args_list||5.013006|
ck_entersub_args_proto_or_list||5.013006|
ck_entersub_args_proto||5.013006|
ck_warner_d||5.011001|v
ck_warner||5.011001|v
ckwarn_common|||
ckwarn_d||5.009003|
ckwarn||5.009003|

src/ppport.h  view on Meta::CPAN

debprofdump||5.005000|
debprof|||
debstackptrs||5.007003|
debstack||5.007003|
debug_start_match|||
deb||5.007003|v
defelem_target|||
del_sv|||
delete_eval_scope|||
delimcpy||5.004000|n
deprecate_commaless_var_list|||
despatch_signals||5.007001|
destroy_matcher|||
die_nocontext|||vn
die_sv||5.013001|
die_unwind|||
die|||v
dirp_dup|||
div128|||
djSP|||
do_aexec5|||



( run in 3.243 seconds using v1.01-cache-2.11-cpan-d8267643d1d )