JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Basic Administration     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

About This Book

1.  Oracle Solaris Management Tools (Road Map)

2.  Working With the Solaris Management Console (Tasks)

3.  Working With the Oracle Java Web Console (Tasks)

4.  Managing User Accounts and Groups (Overview)

5.  Managing User Accounts and Groups (Tasks)

6.  Managing Client-Server Support (Overview)

7.  Managing Diskless Clients (Tasks)

8.  Introduction to Shutting Down and Booting a System

9.  Shutting Down and Booting a System (Overview)

10.  Shutting Down a System (Tasks)

11.  Modifying Oracle Solaris Boot Behavior (Tasks)

12.  Booting an Oracle Solaris System (Tasks)

13.  Managing the Oracle Solaris Boot Archives (Tasks)

14.  Troubleshooting Booting an Oracle Solaris System (Tasks)

15.  x86: GRUB Based Booting (Reference)

16.  x86: Booting a System That Does Not Implement GRUB (Tasks)

17.  Working With the Oracle Solaris Auto Registration regadm Command (Tasks)

18.  Managing Services (Overview)

19.  Managing Services (Tasks)

20.  Managing Software (Overview)

What's New in Software Management in the Oracle Solaris Operating System?

Oracle Solaris Auto Registration

Package and Patching Tools Enhancements to Support Oracle Solaris Zones

Deferred-Activation Patching

Common Agent Container Included in the Oracle Solaris OS

Improvements to How patchadd -M Command Handles Multiple Patches

Package and Patch Tool Enhancements

Where to Find Software Management Tasks

Overview of Software Packages

Tools for Managing Software Packages

Adding or Removing a Software Package (pkgadd)

Key Points for Adding Software Packages (pkgadd)

Guidelines for Removing Packages (pkgrm)

Restrictions on Adding and Removing Software Packages and Patches for Solaris Releases That Are Not Zones Aware

Avoiding User Interaction When Adding Packages (pkgadd)

Using an Administration File

Using a Response File (pkgadd)

21.  Managing Software With Oracle Solaris System Administration Tools (Tasks)

22.  Managing Software by Using Oracle Solaris Package Commands (Tasks)

23.  Managing Patches

A.  SMF Services


Avoiding User Interaction When Adding Packages (pkgadd)

This section provides information about avoiding user interaction when adding packages with the pkgadd command.

Using an Administration File

When you use the pkgadd -a command, the command consults a special administration file for information about how the installation should proceed. Normally, the pkgadd command performs several checks and prompts the user for confirmation before it actually adds the specified package. You can, however, create an administration file that indicates to the pkgadd command that it should bypass these checks and install the package without user confirmation.

The pkgadd command, by default, checks the current working directory for an administration file. If the pkgadd command doesn't find an administration file in the current working directory, it checks the /var/sadm/install/admin directory for the specified administration file. The pkgadd command also accepts an absolute path to the administration file.

Note - Use administration files judiciously. You should know where a package's files are installed and how a package's installation scripts run before using an administration file to avoid the checks and prompts that the pkgadd command normally provides.

The following example shows an administration file that prevents the pkgadd command from prompting the user for confirmation before installing the package.


Besides using administration files to avoid user interaction when you add packages, you can use them in several other ways. For example, you can use an administration file to quit a package installation (without user interaction) if there's an error or to avoid interaction when you remove packages by using the pkgrm command.

You can also assign a special installation directory for a package, which you might do if you wanted to maintain multiple versions of a package on a system. To do so, set an alternate base directory in the administration file by using the basedir keyword. The keyword specifies where the package will be installed. For more information, see the admin(4) man page.

Using a Response File (pkgadd)

A response file contains your answers to specific questions that are asked by an interactive package. An interactive package includes a request script that asks you questions prior to package installation, such as whether optional pieces of the package should be installed.

If you know prior to installation that the package is an interactive package, and you want to store your answers to prevent user interaction during future installations, use the pkgask command to save your response. For more information on this command, see pkgask(1M).

Once you have stored your responses to the questions asked by the request script, you can use the pkgadd -r command to install the package without user interaction.