Friday, April 6, 2012

Fundamentals of Solaris Package Administration

The /var/sadm/install/contents file is a complete record of all the software packages installed on the local system disk. It references every file and directory belonging to every software package and shows the configuration of each product installed. To list the contents of the /var/sadm/install/contents file, perform the command:

# more /var/sadm/install/contents
(output edited for brevity)
/bin=./usr/bin s none SUNWcsr
/dev d none 0755 root sys SUNWcsr SUNWcsd
/dev/allkmem=../devices/pseudo/mm@0:allkmem s none SUNWcsd
/dev/arp=../devices/pseudo/arp@0:arp s none SUNWcsd
/etc/ftpd/ftpusers e ftpusers 0644 root sys 198 16387 1094222536 SUNWftpr
/etc/passwd e passwd 0644 root sys 580 48298 1094222123 SUNWcsr

The pkgadd command updates the /var/sadm/install/contents file each time new packages are installed.

The pkgrm command uses the /var/sadm/install/contents file to determine where the files for a software package are located on the system. When a package is removed from the system, the pkgrm command updates the /var/sadm/install/contents file.

To determine if a particular file was installed on the system disk and to find the directory in which it is located, use the pkgchk command with either the full or partial path name of the command you want to report on. For example, to verify that the showrev command is installed on the system disk, perform the command:

# pkgchk -l -P showrev
Pathname: /usr/bin/showrev
Type: regular file
Expected mode: 0755
Expected owner: root
Expected group: sys
Expected file size (bytes): 29980
Expected sum(1) of contents: 57864
Expected last modification: Dec 14 06:17:58 AM 2004
Referenced by the following packages:
        SUNWadmc      
Current status: installed

Pathname: /usr/share/man/man1m/showrev.1m
Type: regular file
Expected mode: 0644
Expected owner: root
Expected group: root
Expected file size (bytes): 3507
Expected sum(1) of contents: 35841
Expected last modification: Dec 10 10:42:54 PM 2004
Referenced by the following packages:
        SUNWman       
Current status: installed

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete