Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Managing HP-UX Software With SD-UX: HP 9000 Computers > Chapter 7 Modifying IPD or Catalog Contents

Changing and Adding Software Information (swmodify)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Syntax

The syntax for the swmodify command is:

swmodify [-d] [-p] [-r] [-u] [-v[v]] [-V] [-a attribute=[value]] [-C session file] [-f file] [-P pathname_file] [-s product_specification_file] [-S session_file] [-x option=value] [-X option_file] [software_selections]

Examples

Here are some examples of how you can use swmodify to change catalog files or IPDs:

Adding Information

To add files (/tmp/a, /tmp/b. /tmp/c) to an existing fileset:

swmodify -x files=/tmp/a /tmp/b /tmp/c PRODUCT.FILESET

If a control script adds new files to the installed file system, the script can use swmodify to make a record of the new files.

Changing Existing Information

To create some new bundle definitions for products in an existing depot:

swmodify -d -s new_bundle_definitions \ \* @ /mfg/master_depot

If a product provides a more complex configuration process, a script can set the fileset's state to CONFIGURED upon successful completion.

To change the values of a fileset's attributes:

swmodify -a state=installed PRODUCT.FILESET

To change the attributes of a depot:

swmodify -a title=Master Depot \ -a description=/tmp/mfg.description \ @ /mfg/master_depot

Defining New Objects

You can import an existing application (not installed by SD-UX) by constructing a simple Product Specification File (PSF) describing the product and then invoke swmodify to load that definition into the IPD.

To create a new fileset definition (if the PSF contains file definitions, then add those files to the new fileset):

swmodify -s new_fileset_definition

Command Options

Many of the options listed here for swmodify are the same for other SD-UX commands.

Option Action

-d

Perform modifications on a depot (not on a primary or alternate root). Your target_selection must be a depot.

-p

Previews a modify session without changing anything within the target_selection.

-r

Perform modifications on an alternate root (and not the primary root). Your target_selection must be an alternate root.

-u

If no -a attribute options are specified, then delete the specified software_selections from within your target_selection. This action deletes the definitions of the software objects from the depot catalog or Installed Products Database.

If -a attribute options are specified, then delete them from within the given target_selection.

-v[v]

Turns on verbose output to stdout. (The swmodify logfile is not affected by this option.) A second v will turn on very verbose output.

-V

Lists all the SD layout_versions this command supports.

-a attribute=value


Add, change, or deletes the attribute value. Otherwise, it adds/changes the attribute for each software_selection by setting it to the given value.

Multiple -a options can be specified. Each attribute modification will be applied to every software_selection.

The -s and -a options are also mutually exclusive: the -s option cannot be specified when the -a option is specified.

NOTE: In general, you should not use -u option with the -a option. If -u is used and -a is also specified, the -a option deletes the attribute from the given software_selections (or deletes the value from the set of values currently defined for the attribute). You cannot use the -a option to change the following attributes: tag, revision, instance_id, vendor_tag, or corequisite.
-C session_file

Run the command and save the current option and operand values to a file for re-use in another session.

-f file

Read the list of software_selections from file instead of (or in addition to) the command line.

-P pathname_file

Lets you specify a file containing the pathnames of files being added to or deleted from the IPD instead of having to specify them individually on the command line.

-s product_specification_file

The source Product Specification File (PSF) describes the product, subproduct, fileset, and/or file definitions that will be added or modified by swmodify.

If a product_specification_file (PSF) is specified, swmodify selects the individual software_selections from the full set that is defined in the PSF. If no software_selections are specified, then swmodify will select all of the software defined in the PSF. The software selected from a PSF is then applied to the target_selection, with the selected software objects either added to, modified in, or deleted from it.

If a PSF is not specified, then software_selections must be specified. swmodify will select the software_selections from the software defined in the given (or default) target_selection.

-S session_file

Execute swmodify based on the options and operands saved from a previous session, as defined in session_file.

-x option=value

Set the session option to value and override the default value (or a value in an alternate options_file specified with the -X option). Multiple -x options can be specified.

-X option_file

Read the session options and behaviors from options_file.

swmodify lets you specify a single, local target_selection. If you are operating on the primary root, you do not need to specify a target_selection because the target / is assumed.

When operating on a software depot, the target_selection specifies the path to that depot. If the -d option is specified and no target_selection is specified, then the default depot_directory is assumed.

See Appendix A “Default Options and Keywords ” for a complete listing and description of default options.

Command Operands

The swmodify command supports the standard software selection syntax. For more details on software selection syntax and an example of a software selection file, see “Command Operands ”.

Changing Default Options

In addition to the command-line option listed above, several swmodify behaviors and policy options can also be changed by editing extended option and default values found in the system-wide defaults file: /var/adm/sw/defaults

or in the user-specific defaults file:

$HOME/.swdefaults

Values in these files are specified using the command.option=value syntax. For example:

swmodify.agent_auto_exit=true

Table 7-1 Modify Default Options

control_files=loglevel=1
distribution_target_directory= /var/spool/swpatch_commit=false
files=

software=

layout_version=1.0source_file=
logdetail=false

targets=

logfile=/var/adm/sw/swmodify.log

verbose=1

 

Using Session Files

Each invocation of the swmodify command defines a modify session. The invocation options, source information, software selections, and target hosts for this session are saved before the modify task actually commences. This lets you re-execute the command even if the session ends before proper completion.

Each session configuration is automatically saved to the file $HOME/.sw/sessions/swmodify.last. This file is overwritten at each invocation of swmodify.

You can save a session configuration to a specific file by executing swmodify with the -C session_file option.

If you do not specify a specific path for the session file, the default location is $HOME/.sw/sessions/.

To re-execute a session file, specify the session file as the argument for the -S session__file option of swmodify.

Note that when you re-execute a session file, the values in the session file take precedence over values in the system defaults file. Likewise, any command line options or parameters that you specify when you invoke swmodify take precedence over the values in the session file

Environment Variables

SD programs are affected by external environment variables and environment variables set for use by control scripts. For a description of external environment variables, see Chapter 11, Control Scripts.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.