HP Software Package Builder (SPB) manual Using Control Scripts

Page 64

Advanced Features

Using Control Scripts

Using Control Scripts

You can use control scripts to customize the behavior of your software package. SD-UX supports execution of both product and fileset control scripts. These shell scripts allow you to perform customized checks and operations as part of your regular software management tasks. The swinstall, swconfig, swverify, swask, and swremove commands can execute one or more of these scripts. Control scripts are usually supplied by software vendors, but you can write your own. All control scripts are optional.

Product level control scripts are run if any fileset within that product is selected for installation, configuration, verification, or removal. The activities in product control scripts must pertain to all filesets in that product, but not to any one fileset in particular.

Actions you want to apply to every fileset in a product should be in the appropriate product level control script. Fileset scripts must pertain only to the installation, configuration, or removal of that fileset, and not to any other fileset or to a parent product.

Control scripts can perform a wide variety of customizing and configuration tasks, such as (but not limited to):

Verifying if someone is actively using the product and, if so, preventing reinstallation, update or removal

Ensuring the local host system is compatible with the software (scripts can check beyond the compatibility enforced by the product's uname attributes)

Removing obsolete files or previously installed versions of the product

Creating links to, or additional copies of, files after they have been installed

Copying configurable files into place on first-time installation

Conditionally copying configurable files into place on later updates

Modifying existing configuration files for new features

Rebuilding custom versions of configuration files

Creating device files or custom programs

64

Chapter 5

Image 64
Contents Edition Manufacturing Part Number DecemberWarranty Government LicenseCopyright Notice Trademark NoticesPublication History Typographic Conventions Contents Glossary Index Introduction to Software Features Benefits FeaturesSoftware Package Builder Overview Software Package Builder and HP-UX Software DistributorSoftware Package Builder Overview System Requirements To access Java configuration informationOptimizing Java Installation Installation OverviewTo download SPB from the Web Starting Software Package Builder Specifying Packaging Policy Rules FilePage Software Packaging Software Packaging Overview Software packaging lifecycle is displayed in Figure Software Packaging LifecycleSoftware Packaging Lifecycle TIP Software Package Structure Organizing FilesystemsSoftware Elements Software Package Structure Software Package Hierarchy Software Package HierarchyStructural Elements Functions and Relationships Structural Function Relationship ElementSoftware Package Structure Product Specification File AttributesRequired Attribute Values Software Element Required AttributeRecommended Attribute Values Software Element Recommended AttributePackaging Policies Page Software Package Builder Introduction Package Structure Screen RegionsAttribute Table Policy Help Tab Messages TabPSF View Tool Bar MenusAdditional Information Page Getting Started with Software Getting Started Using the SPB GUI Creating a New PSFTo create a PSF To create a product and add filesetsManaging Fileset Content Step From the Structure menu, select Add Elements FilesTo create a destination filesystem Step Click Add DirectoryValidating a PSF To set file or directory permissionsTo filter the attribute display Setting AttributesTo set attributes You enter new data into the PSF, SPB re-validates the file Using the SPB Command Line Interface Editing from the CLIValidating from the CLI ExampleIncorporating SPB into Automated Processes Return ValuesAdditional Information Advanced Features Managing Fileset Content Manage Fileset Content Dialog Box Using Advanced Features RegionsFile Mapping OptionsMapping Options Setting FileTo set the recursive option To set the file * or include option Mode field of the Directory Attributes and File Attributes File Mode AccessAdd PermissionsStep Select Apply to All To apply a mode to all filesAttributes table Step Select the Advanced Options button To change the default representation of the Mode fieldPermissions Selections Managing Fileset Content To create a subproduct Creating and Using a SubproductSubproduct Creating and Using a Bundle To create a bundleTo add a vendor or category Creating and Using a Vendor or CategoryAttribute Table Creating and Using Vendor Defined Attributes To create a vendor defined attributeTo edit a vendor defined attribute AttributesSoftware Specification Attributes Overview of Software Specification AttributesDependency Attributes Specifications ResolvingSoftware SPBWorking with Dependency Attributes Software Specification StatusSPB will not To add a dependency attribute using the and relationship To add a dependency attribute using the or relationship Select Structure Add Elements CorequisitesClick Add Set Click AddClick Add Content To add remote content as a dependency attributeStep Select Structure Add Elements Corequisites Using Control Scripts Using Control Scripts Additional Information Page Glossary GlossaryMultiple architecture Optional attribute Tag Unconfigure script Unconfigure script Glossary Index Software elements, 20 bundle, 21 category Index