Application Packaging Developer's Guide

The sed Class Script

The sed class provides a method to modify an existing object on the target system. The sed class action script executes automatically at installation if a file belonging to class sed exists. The name of the sed class action script should be the same as the name of the file on which the instructions will be executed.

A sed class action script delivers sed instructions in the format shown in the figure below.

Figure 3–1 Format of a sed Class Action Script

# comment, which may appear on any line in the file
# sed(1) instructions which will be invoked during
# installation of the object
[address [,address]] function [arguments]
  . . .
# sed(1) instructions to be invoked during the removal process
[address [,address]] function [arguments]

Two commands indicate when instructions should be executed. The sed instructions that follow the !install command are executed during package installation and those that follow the !remove command are executed during package removal. It does not matter which order these commands are used in the file.

For more information on sed instructions, see sed(1). For examples of sed class action scripts, see Chapter 5, Package Creation Case Studies.