Brief Description

The $INTERBASE variable has two main uses one during run time and another during installation

Feature Description

Installation:

During installation $INTERBASE variable is used to define the path under which the Interbase product is to be installed. It is required that if this path is different from "/usr/interbase" that during run time all the users have the correct path set.

Runtime:

During runtime there are two ways of setting the interbase home directory either by using the $INTERBASE or giving the server a command line argument of -h(ome). $INTERBASE_LOCK and $INTERBASE_MSG may be used to independently control the location of the interbase lock file and the interbase message file. Command line arguments of -hl(ock) and -hm(sg) are also provided.

During runtime the Precedence is as follows:

  1. Command line arguments of -hl/-hm for lock file/message file.
  2. $INTERBASE_LOCK/$INTERBASE_MSG for lock file/message file.
  3. Command line argument -h for interbase home.
  4. $INTERBASE.
  5. /usr/interbase the default interbase home. (Registry for Windows NT)

Note: That the windows specific IBSERVER variable has been retired this was an undocumented feature on the Windows 4.2 release.

Implementation

IThree functions gds_prefix(), gds_prefix_lock() and gds_prefix_msg() (to be added) will be used to provide the interbase home directory, interbase lock file directory and the interbase message file directory.

Three new static variables ib_prefix, ib_prefix_lock and ib_prefix_msg will be added to store the values of interbase home, interbase lock file directory and interbase message file directory. The functions will check if these variables are NULL if they are then they will select the interbase directories based on the precedence order defined above.

char * ib_prefix;
char * ib_prefix_lock;
char * ib_prefix_msg;
main(int  argc, char **argv)
{
...
...
check if -h command line argument set
if set
ib_prefix = value of command line argument -h
check if -hl command line argument set
if set
ib_prefix_lock = value of command line argument -hl
check if -hm command line argument set
if set
ib_prefix_msg = value of command line argument -hm
...
...
...
}

gds_prefix()
if (ib_prefix != NULL)
return ib_prefix
check for environment variable $INTERBASE
if set
ib_prefix = value of environment variable $INTERBASE
else
ib_prefix = “/usr/interbase”
return ib_prefix

gds_prefix_lock()
if (ib_prefix_lock != NULL)
return ib_prefix_lock
check for environment variable $INTERBASE_LOCK
if set
ib_prefix_lock = value of environment variable $INTERBASE_LOCK
else
ib_prefix_lock = gds_prefix()
return ib_prefix_lock

gds_prefix_msg()
if (ib_prefix_msg != NULL)
return ib_prefix_msg
check for environment variable $INTERBASE_MSG
if set
ib_prefix_msg = value of environment variable $INTERBASE_MSG
else
ib_prefix_msg = gds_prefix()
return ib_prefix_msg

However since these functions are also to be provided externally wrapper functions of isc_prefix(), isc_prefix_lock() and isc_prefix_msg() will be provided.

Additional Comments

Note that in 5.0, the -h, -hm, and -hl flags are NOT passed through from ibmgr to ibguard and thence to ibserver. Therefore, these flags should not be in the user documentation, since there is no way for the users to take advantage of them. The flags on the ibserver command line are part of future development.

On the Unix platforms, the install script creates a shell wrapper around the ibmgr binary. The shell wrapper sets the INTERBASE environment variable which is passed through to ibguard and ibserver. The user is still responsible to ensuring that the environment variable is set in clients if INTERBASE is not /usr/interbase.