#!/usr/local/bin/perl
use
blib;
use
strict;
use
warnings;
use
AFS::PTS;
die
"Usage: $0 name isgroup ownerid\n"
if
(
$#ARGV
!= 2);
my
$name
=
shift
;
my
$isgroup
=
shift
;
my
$ownerid
=
shift
;
my
$pts
= AFS::PTS->new;
$AFS::CODE
and
"AFS::CODE = $AFS::CODE\n"
;
my
$flag
;
if
(
$isgroup
) {
$flag
=
&AFS::PRGRP
; }
else
{
$flag
=
&AFS::PRUSER
; }
my
$id
=
$pts
->PR_NewEntry(
$name
,
$flag
,
$ownerid
);
if
(
$AFS::CODE
) {
"AFS::CODE = $AFS::CODE\n"
; }
else
{
" ID number = $id \n"
; }