lsbinstall

Name

lsbinstall -- installation tool for various types of data

Synopsis

/usr/lib/lsb/lsbinstall [-c | --check | -r | --remove] -t type | --type=type operand...

Description

The lsbinstall command may be used to install certain types of files into system specific locations. This command may be used during a package post installation script to add package specific data to system wide repositories. A user may need appropriate privilege to invoke lsbinstall.

If the -c or --check option is specified, lsbinstall shall test to see if there is an existing object of the type specified already installed. If there is, lsbinstall shall print a message to its standard output and immediately exit with a status of zero. If there is no object of the type and name specified already installed, lsbinstall shall exit with a non-zero status and take no further action.

Note: The format of the message is defined only when the --type=init option is specifed.

If the -r or --remove is specified, the named object of the specified type shall be removed from the system.

Object Types

The -t type or --type=type option shall support at least the following types:

font 

install a font file into the systemwide font repository, if the system supports one. There shall be one operand, that names a font file.

init 

install an init script into the system specific location. There shall be one operand, that names an init script file. On success, a name suitable for use with the install_initd and remove_initd commands shall be printed to the standard output. See also Installation and Removal of Init Scripts.

profile 

install a profile script into a system specific location. There shall be one operand, that names a profile shell script. The behavior is unspecified if this name does not have the suffix .sh. The sh utility shall read and execute commands from all such profile shell scripts when invoked as an interactive login shell, or if the -l (the letter ell) is specified (see Shell Invocation).

service 

ensure a service name and number pair is known to the system service database. When installing, there must be at least two operands. The first operand shall have the format %d/%s with the port number and protocol values (e.g. 22/tcp), and the second operand shall be the name of the service. Any subsequent operands provide aliases for this service. If any of the -r, --remove, -c or --check options are specified, there shall be a single operand identifiying the port and protocol values (with the same format as above).

inet 

add an entry to the systems network super daemon configuration. There shall be one operand, that names a file with the following format:

service <service_name>
{
	<attribute> <assign-op> <value ...>
}
The system shall support the assign-op operator '='. The following values for attribute shall be supported:

socket_type 

One of the following values:

stream 

the service will use a stream type socket.

dgram 

the service will use a datagram type socket.

seqpacket 

the service will use a sequenced packet type socket.

protocol 

The name of a protocol. The name shall be one of those listed in /etc/protocols. If this attribute is not specified, the system shall use an implementation defined default protocol.

wait 

If the value of this attribute is yes, once the service is started, no further requests for that service will be handled until the service exits. If the value is no, the network super daemon shall continue to handle further requests for the given service while that service is running.

Note: If the service has the socket_type attribute set to dgram, the wait attribute should be set to yes, since such services do not have any distinction between the socket used for listening and that used for accepting.

user 

The name of a user from the user login database. The service started to handle this request shall run with the privileges of the specified user.

server 

The name of a program to run to handle the request.

server_args 

The arguments to pass to the program.

crontab 

Install a crontab into the system specific location. There shall be one operand, that names a crontab file. See Cron Jobs.

package 

Invoke the system specific package installation utility (or package removal utility if the -r or --remove option was specified). There shall be one operand, that names a package file.

menu 

install a desktop menu entry into the system menu database, if the system supports one. There shall be one operand, that names a menu file.

ldconfig 

Register a directory that contains shared libraries with the system. There shall be one operand, that names a directory.

Note: If the -r or --remove option is specified, the named path will be removed from the system configuration, even if other packages depend on it. Shared library entries should only be removed from the system configuration when the calling application can guarantee no other package or utility depends on this library path,

man 

Install a manual page into the appropriate system manual repository.

Examples

lsbinstall --type=profile myco.com-prod.sh

Install the profile shell script for myco.com-prod.sh.

lsbinstall --check --type=profile myco.com-prod.sh

Test to see if the profile shell script for myco.com-prod.sh is installed correctly.

Exit Status

If the -c or --check option is specified, lsbinstall shall exit with a zero status if an object of the specified type and name is already installed, or non-zero otherwise. Otherwise, lsbinstall shall exit with a zero status if the object with the specified type and name was successfully installed (or removed if the -r or --remove option was specified), and non-zero if the installation (or removal) failed. On failure, a diagnostic message shall be printed to the standard error file descriptor.