Each script should be able to be executed more than once since it is executed once for each volume in a package. This means that executing a script any number of times with the same input produces the same results as executing the script only once.
Each procedure script that installs a package object not in the pkgmap file must use the installf command to notify the package database that it is adding or modifying a path name. After all additions or modifications are complete, this command should be invoked with the -f option. Only postinstall and postremove scripts may install package objects in this way. See installf(1M) and Chapter 5, Package Creation Case Studies for more information.
Administrator interaction is not permitted during execution of a procedure script. All administrator interaction is restricted to the request script.
Each procedure script that removes files not installed from the pkgmap file must use the removef command to notify the package database that it is removing a path name. After removal is complete, this command should be invoked with the -f option. See removef(1M) and Chapter 5, Package Creation Case Studies for details and examples.
The installf and removef commands must be used because procedure scripts are not automatically associated with any path names listed in the pkgmap file.