Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
3.  Enhancing the Functionality of a Package Creating Information Files How to Define Package Dependencies Example--depend File  Previous   Contents   Next 
   
 

Writing a Copyright Message

You need to decide whether your package should display a copyright message while it is being installed. If so, create the copyright file.


Note - You should include a copyright file to provide legal protection for your software application. It might be a good idea to check with the legal department of your company for the exact wording of the message.


To deliver a copyright message, you must create a file named copyright. During installation, the message is displayed exactly as it appears in the file (with no formatting). See copyright(4) for more information.


Note - Be certain that your copyright file has an entry in the prototype file. Its file type should be i (for package information file).


How to Write a Copyright Message

  1. Make the directory containing your information files the current working directory.

  2. Create a file named copyright with your favorite text editor.

    Enter the text of the copyright message exactly as you want it to appear as your package is installed.

  3. Save your changes and quit the editor.

  4. Complete one of the following tasks.

  5. Build your package.

    See "How to Build a Package", if needed.

Where to Go Next

After you build the package, install it to confirm that it installs correctly and verify its integrity. Chapter 4, Verifying and Transferring a Package explains how to do this and provides step-by-step instructions on how to transfer your verified package to a distribution medium.

Example--copyright File

For example, a partial copyright message might look like:

Copyright (c) 1999 Company Name
All Rights Reserved
 
This product is protected by copyright and distributed under
licenses restricting copying, distribution and decompilation.

Reserving Additional Space on a Target System

You need to determine whether your package needs additional disk space on the target system (space in addition to that required by the package objects). If so, create the space information file. This is different than creating empty files and directories at installation time as discussed in "Defining Additional Objects to Be Created at Install Time".

While the pkgadd command ensures that there is enough disk space to install your package based on the object definitions in the pkgmap file, a package may require additional disk space beyond that needed by the objects defined in the pkgmap file. For example, your package might create a file after installation, which may contain a database, log files, or some other growing file that consumes disk space. To be sure that there is space set aside for it, you should include a space file specifying the disk space requirements. The pkgadd command checks for the additional space specified in a space file. Refer to space(4) for more information.


Note - Be certain that your space file has an entry in the prototype file. Its file type should be i (for package information file).


How to Reserve Additional Space on a Target System

  1. Make the directory containing your information files the current working directory.

  2. Create a file named space with your favorite text editor.

    Enter any additional disk space requirements needed by your package, using this format:

    pathname  blocks  inodes

    pathname

    Specifies a directory name, which may or may not be the mount point for a file system.

    blocks

    Specifies the number of 512-byte blocks that you want reserved.

    inodes

    Specifies the number of required inodes.

    For more information, see space(4).

  3. Save your changes and quit the editor.

  4. Complete one of the following tasks.

  5. Build your package.

    See "How to Build a Package", if needed.

Where to Go Next

After you build the package, install it to confirm that it installs correctly and verify its integrity. Chapter 4, Verifying and Transferring a Package explains how to do this and provides step-by-step instructions on how to transfer your verified package to a distribution medium.

Example--space File

This example space file specifies that 1000 512-byte blocks and 1 inode be set aside in /opt on the target system.

/opt   1000   1

Creating Installation Scripts

This section discusses optional package installation scripts. The pkgadd command automatically performs all the actions necessary to install a package using the package information files as input. You do not have to supply any package installation scripts. However, if you want to create customized installation procedures for your package, you can do so with installation scripts. Installation scripts:

  • Must be executable by the Bourne shell (sh).

  • Must contain Bourne shell commands and text.

  • Do not need to contain the #!/bin/sh shell identifier.

  • Need not be an executable file.

There are four types of installation scripts with which you can perform customized actions:

  • The request script

    The request script solicits data from the administrator installing a package for assigning or redefining environment variables.

  • The checkinstall script

    The checkinstall script examines the target system for needed data, can set or modify package environment variables, and determines whether or not the installation proceeds.


    Note - The checkinstall script is available starting with the Solaris 2.5 and compatible releases.


  • Procedure scripts

    Procedure scripts identify a procedure to be invoked before or after the installation or removal of a package. The four procedure scripts are preinstall, postinstall, preremove, and postremove.

  • Class action scripts

    Class action scripts define an action or set of actions that should be applied to a class of files during installation or removal. You can define your own classes or use one of the four standard classes (sed, awk, build, and preserve).

 
 
 
  Previous   Contents   Next