Content-type: text/html
Man page of LFC_SELECTSRVR
LFC_SELECTSRVR
Section: LFC Library Functions (3)
Updated: $Date: 2001/10/04 12:12:49 $
Index
Return to Main Contents
NAME
lfc_selectsrvr - select the LFC Name Server
SYNOPSIS
int lfc_selectsrvr (char *path,
char *current_directory_server,
char *server,
char **actual_path);
DESCRIPTION
lfc_selectsrvr
selects the LFC Name Server.
The name server host name is selected according to the following rules:
-
if
path
is in the form
server:pathname,
server
is used else
if the environment variable LFC_HOST is set, its value is used as server name
else
if an entry for LFC HOST exists in the configuration file
/etc/shift.conf,
the corresponding value is used else
if
path
is an absolute path and contains at least 3 components,
the second component of the pathname is the domain name and the third component
is prefixed by the value of
CnsHostPfx
(defined in
site.def)
to give the hostname or its alias else
the Name Server running on the local machine is used.
EXAMPLES
1)
path
is
castor1:/castor/cern.ch/user/b/baud/test
server
will be
castor1
and
actual_path will be
/castor/cern.ch/user/b/baud/test
2) The environment variable has been set using
-
setenv LFC_HOST castor5
and
path
is
/castor/cern.ch/user/b/baud/test
server
will be
castor5
and
actual_path will be
/castor/cern.ch/user/b/baud/test
3) The environment varaible is not set, but there is an entry in
/etc/shift.conf
like
-
LFC HOST castor2
and
path
is
/castor/cern.ch/user/b/baud/test
server
will be
castor2
and
actual_path will be
/castor/cern.ch/user/b/baud/test
4) The environment variable is not set, there is no entry in
/etc/shift.conf,
NsHostPfx is defined as
lfc
in
site.def
and
path
is
/castor/cern.ch/user/b/baud/test
server
will be
lfcuser
and
actual_path will be
/castor/cern.ch/user/b/baud/test
RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation
failed. In the latter case,
serrno
is set appropriately.
ERRORS
- EFAULT
-
path,
server
or
actual_path
is NULL.
- EINVAL
-
the server name is too long.
FILES
- /etc/shift.conf
-
LFC global configuration file
- site.def
-
site specific LFC compilation options
SEE ALSO
Castor_limits(4)
AUTHOR
LCG Grid Deployment Team
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- EXAMPLES
-
- RETURN VALUE
-
- ERRORS
-
- FILES
-
- SEE ALSO
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 11:46:11 GMT, June 26, 2009