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

The swmodify Command

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The syntax for the swmodify command is:

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

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

Title not available (The swmodify Command )

Option

Action

-d

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

-r

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

-p

Previews a modify session without changing anything within the 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.

-u

If no -a attribute=value 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.

-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 .

-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.

-a attribute=value

Add, change, or delete the attribute value. If the -u option is also specified, then it deletes the attribute from the given software_selections (or deletes the value from the set of values currently defined for the attribute). 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 that you cannot change all attributes using the -a option.

-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.

-f file

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

-C session file

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

-S session_file

Execute swmodify based on the options and operands saved from a previous session, as defined in session_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.

Command Operands

The swmodify command supports the standard software selection (bundle[.product[.subproduct][.fileset][,version]) and target selection (@ host[:/directory]) operands.

For more details on software selection syntax and an example of a software selection file, see “Command Line Software Selections ” in Chapter 2 “Installing and Copying Software ”.

Changing Options and Defaults

In addition to the command-line options listed above, several command behaviors and policy options can be changed by editing default values found in the defaults file /var/adm/sw/defaults. Values in this file are specified using the command.option=value syntax. See Chapter 2 “Installing and Copying Software ” and Appendix A “Default Options and Keywords ” for more information on changing the values in these defaults and extended options.

The following keywords define source and target options as well as output and logging behavior that is specific to swmodify(all keywords are preceded with swmodify.):

Title not available (Changing Options and Defaults )

source_file=

Defines the default product_specification_file to read as the source. The -s option overrides this default. This default will only have effect if neither the -s nor the -a option is specified.

target_directory=/var/spool/sw

Defines the default distribution directory in which products will be modified. The target_selection operand overrides this default. This default only applies when the -d option is specified.

verbose=0

Controls the verbosity of the swmodify output (stdout). A value of 0 disables output to stdout. (Error and warning messages are always written to stderr). A value of 1 enables verbose messaging to stdout. A value of 2 enables very verbose messaging to stdout.

loglevel=1

Controls the log level for the events logged to the swmodify logfile. A value of 0 disables logging to the logfile; no information is logged. The default value of 1 enables verbose logging to the logfile. A value of 2 enables very verbose logging to the logfile.

logdetail=false

Controls the amount of detail sent to the logfile. A value of true allows additional detail depending on the loglevel specified. The default value of false restricts the amount of detail to POSIX (with loglevel=1) or POSIX and file level messages only (with loglevel=2).

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

Defines the default command logfile.

files=

When adding or deleting file objects, this option can list the pathnames of those file objects. There is no supplied default. (File objects being added or deleted can also be specified in the given product_specification_file.)

If there is more than one pathname, they must be separated by whitespace and surrounded by double-quotes.

software=

Defines the default software_selections. There is no supplied default. If there is more than one software selection, they must be separated by whitespace and surrounded by double-quotes.

targets=

Defines the default target_selection. There is no supplied default.

swmodify and the Product Specification File (PSF)

The product_specification_file (PSF) for swmodify uses the same swpackage PSF format as defined in “Creating a Product Specification File (PSF)”.

A full PSF contains at least product, fileset, and file definitions. It can serve as valid input to the swpackage command, and provides swmodify with the information needed to create a new product, with filesets and files. A full PSF can also be specified when adding new filesets or files to existing products or filesets. A full PSF can also be specified when removing filesets (or files) from existing products (or filesets).

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