Solaris::Contents - Read /var/sadm/install/contents file


sol-inst documentation  | view source Contained in the sol-inst distribution.

Index


NAME

Top

Solaris::Contents - Read /var/sadm/install/contents file

SYNOPSIS

Top

$c=Solaris::Contents::new();

DESCRIPTION

Top

Solaris::Contents is an object oriented interface into the /var/sadm/install/contents file which Solaris uses to keep track of all the files installed on a system, and their corresponding packages.

CONSTRUCTOR METHOD

Top

$c=Solaris::Contents::new();

No arguements are required. By default, the object always believes the contents file is /var/sadm/install/contents. The ability to change this could change with a future release.

OBJECT METHODS

Top

entries()

Returns an array of every file record in the contents file. Very long.

entriesForPkg()

Returns an array of every file record for a specified package.

entry($file)

Returns a hash table of every element for a specified file.

ftype($file)
class($file)
major($file)
minor($file)
mode($file)
user($file)
group($file)
size($file)
cksum($file)
modified($file)
pkgs($file)

Each of the above methods returns the specific data for a specified file entry from the contents file. Not all entries will have data specific to every method. Check the Solaris prototype man page for more information. The pkgs() method returns an array of packages related to that specific file.

NOTES

Top

The initialization time of Contents objects could take a few seconds depending on the size of the contents file.

I may add more methods to this class later on. It would be kind of neat to do more with the link entries.

AUTHOR

Top

Chris Josephes, chrisj@onvoy.com


sol-inst documentation  | view source Contained in the sol-inst distribution.