> How would one go about doing the equivalent of a pagsh 
> command in a perl script?  What I would like to be able 
> to do is start a pag, klog, execute some statements 
> and then unlog.  I would like to do this all in perl.
> Has anyone had any experience in doing this?

Our local AFS-perl guru, Josh Wilmes, says:

> It would be something like:
> sub setpag {
>     if (syscall([AFS_SYSCALL], [AFSCALL_SETPAG])) {
>         die "setpag: $!\n";
>     }    
> }
> 
> You need to extract the values of AFS_SYSCALL and AFSCALL_SETPAG from the
> afs include files.  h2ph can't handle it.
> 
> 
> For the klog, just 
> setpag();
> 
> open (K,"|klog -principle foo -pipe") || die "fooey"
> print K,"mypassword\n";
> close (K);
> 
> 
> I have a c program and a perl script that I use to extract the AFS constants
> from the include files and make an "afs.ph" file.  But this is probably not
> necessary for most people, just hardcode them and make a note where you got
> them from.
> 


--
Daniel Bromberg, Co-op                             M/S 171-300 (818) 354-4122
[EMAIL PROTECTED]                                    FAX: (818) 393-5009
Metrics Engineer, EIS project                      4800 Oak Grove Dr.
Jet Propulsion Laboratory                          Pasadena, CA 91109


                                                

Reply via email to