Application Packaging Developer's Guide

The Administrative Defaults File

Administrators responsible for installing packages can use administration files to control package installation. However, as a package designer, you need to know about administration files and how an administrator can alter your intended package installation.

An administration file tells the pkgadd command whether to perform any of the checks or prompts that it normally does. Consequently, administrators should fully understand a package's installation process and the scripts involved before using administration files.

A basic administrative defaults file is shipped with the SunOS operating system in /var/sadm/install/admin/default. This is the file that establishes the most basic level of administrative policy as regards the installation of software products. The file looks like this as shipped:

#ident "@(#)default
1.4 92/12/23 SMI"	/* SVr4.0	*/ 

The administrator may edit this file to establish new default behaviors, or create a different administration file and specify its existence by using the -a option to the pkgadd command.

Eleven parameters can be defined in an administration file, but not all need to be defined. For more information, see admin(4).

The basedir parameter specifies how the base directory will be derived when a package is installed. Most administrators leave this as default, but basedir can be set to one of the following:

Note –

If the pkgadd command is called with the argument -a none, it always asks the administrator for a base directory. Unfortunately, this also sets all parameters in the file to the default value of quit, which can result in additional problems.

Becoming Comfortable With Uncertainty

An administrator has control over all packages being installed on a system by using an administration file. Unfortunately, an alternate administrative defaults file is often provided by the package designer, bypassing the wishes of the administrator.

Package designers sometimes include an alternate administration file so that they, not the administrator, control a package's installation. Because the basedir entry in the administrative defaults file overrides all other base directories, it provides a simple method for selecting the appropriate base directory at install time. In all versions of the Solaris OS prior to the Solaris 2.5 release, this was considered the simplest method for controlling the base directory.

However, it is necessary for you to accept the administrator's desires regarding the installation of the product. Providing a temporary administrative defaults file for the purpose of controlling the installation leads to mistrust on the part of administrators. You should use a request script and checkinstall script to control these installations under the supervision of the administrator. If the request script faithfully involves the administrator in the process, System V packaging will serve both administrators and package designers.