DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Packaging your software applications

Approach

To modify /etc/inittab during installation, you must:

  1. Create a class.

    Create a class called inittab. You must provide an installation and a removal class action script for this class. Define the inittab class in the CLASSES parameter in the sample pkginfo file.

  2. Create an inittab(F) file.

    This file contains the information for the entry that you will add to /etc/inittab. Notice in the sample prototype file that inittab is a member of the inittab class and has a file type of e for editable. The sample inittab file upon which this is based is also shown.

  3. Create an installation class action script.

    Because class action scripts must be multiply executable (you get the same results each time they are executed), you cannot just add our text to the end of the file. The sample class action script, performs the following procedures:

    Note that init q can be performed by this installation script. A one-line postinstall script is not needed by this approach.

  4. Create a removal class action script.

    The sample removal script is very similar to the installation script. The information added by the installation script is removed and init q is executed.

This case study resolves the drawbacks to case study 5a. You can support multiple package instances because the comment at the end of the inittab entry is now based on package instance. Also, you no longer need a one-line postinstall script. However, this case has a drawback of its own. You must deliver two class action scripts and the inittab(F) file to add one line to a file. Case 5c shows a more streamlined approach to editing /etc/inittab during installation.


Next topic: pkginfo file
Previous topic: Techniques

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003