Preventing user interaction when installing and upgrading Solaris 10 packages


By default, whey you install or upgrade Solaris packages or patches, It always ask you to prompt yes or no. Here just show how to avoid this.

Furthur more, packages must be added or removed without the user being prompted for information when using the following standard Oracle Solaris utilities.

    The custom JumpStart program

    Live Upgrade

    Oracle Solaris installation program program

    Oracle Solaris Zones

To test a package to ensure that it will install with no user interaction, a new administration file can be set up with the pkgadd command -a option. The -a option defines an installation administration file to be used in place of the default administration file. Using the default file might result in the user being prompted for more information.

You can create an administration file that indicates to pkgadd that it should bypass these checks and install the package without user confirmation.

For details, see the man page admin(4) or pkgadd(1M).


The following examples show how the pkgadd command uses the administration file.

No administration file

If no administration file is provided, pkgadd uses /var/sadm/install/admin/default. Using this file might result in user interaction.

Relative administration file

If a relative administration file is provided on the command line, pkgadd looks in /var/sadm/install/admin for the file name and uses it.

# pkgadd -a nocheck

In the example above, the relative administration file is named nocheck and pkgadd looks for current directory and /var/sadm/install/admin for admin file nocheck.

Absolute administration file

If an absolute file is provided pkgadd uses it. In this example, pkgadd looks in /tmp for the nocheck administration file.

 # pkgadd -a /tmp/nocheck


Example administration file:

The following is an example of an installation administration file that requires very little user interaction with the pkgadd utility. Unless the package requires more space than is available on the system, the pkgadd utility uses this file and installs the package without prompting the user for more information.

mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
space=ask
setuid=nocheck
confiict=nocheck
action=nocheck
basedir=default

To compare, below is the default administration file

mail=
instance=unique
partial=ask
runlevel=ask
idepend=ask
rdepend=ask
space=ask
setuid=ask
conflict=ask
action=ask
networktimeout=60
networkretries=3
authentication=quit
keystore=/var/sadm/security
proxy=
basedir=default

 

Note: this administration file also works with pkgrm,pkgtrans etc..

 

Comments powered by CComment