Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sd(5) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

swacl(8)

swagentd(8)

swconfig(8)

swcopy(8)

swdepot(8)

swinstall(8)

swlist(8)

swpackage(8)

swremove(8)

swverify(8)

pushAgent(8)

swpackage(4)

sd(4)

sd(5)  —  SD 2.0 Release

NAME

sd − Create, distribute, install, and manage software products

SYNOPSIS

sw<task> [XToolkit Options] [-i] [-p] [-v] [-r|-d] [-s source] [task specific options] [-x option=value] [-X option_file] [-f file] [-t target_file] [-S session_file] [software_selections] [ @  target_selections]

DESCRIPTION

The HP OpenView Software Distributor (SD) commands are:

• swacl - modify the Access Control Lists (ACLs) which protect software products;

• swconfig - configure, unconfigure, or reconfigure installed software;

• swcopy - copy software products for subsequent installation or distribution;

• swdepot - register or unregister software depots;

• swinstall - install and configure software products;

• swlist - display information about software products;

• swpackage - package software products into a distribution directory or tape;

• swremove - unconfigure and remove software products;

• swverify - verify software products. 

The following sections highlight the features that these commands support. 

Distributed Operation

All of the commands except swpackage use a distributed model of operation.  The commands act as the controller for distributed operations, orchestrating the specific software management tasks.  For each target_selection, an SD agent process performs the task(s):

• swagent - perform software management tasks as the agent of an SD command. 

Communication between the command and each agent, plus other target host activities are facilitated by an SD daemon process:

• swagentd - serve local or remote software management tasks. 

Secure Operation

SD uses Access Control Lists (ACLs) to authorize a user attempting to create, modify, or read software products in a depot or installed to a root filesystem.  The superuser can grant specific local and remote users specific access permissions to a target host, a target depot, and/or a target root filesystem. 

SD uses a method based on credentials and passwords to authenticate the user and the SD command performing a given operation. 

Software Products

Software products are organized in a three-level hierarchy: products, subproducts, and filesets. The actual files that make up a product are packaged into filesets. Subproducts can be used to partition or subset the filesets into logical groupings.  (Subproducts are optional.)

The software_selections for an SD command can specify entire products, individual subproducts, and/or individual filesets. 

Interactive Operation

By default, all SD commands operate in a non-interactive mode.  The swinstall, swcopy, and swremove commands also support a graphical user interface (GUI).  (The interactive GUIs are invoked using the -i option, or by invoking the GUI commands without any command-line options.) 

Compatible Software

Software products specify what machine type(s) and operating system(s) they support (i.e. are compatible with).  The swinstall, swconfig, and swverify commands can detect and/or enforcement the use of compatible software. 

Dependencies Between Software

The swinstall, swcopy, swconfig, swverify, and swremove commands support dependencies between filesets and other filesets and products. 

If a software_selection specifies a dependency on other filesets and/or products, the commands will automatically select that software.  An exception is swremove, which will automatically select dependent software (filesets and/or products that depend on the software_selections).

By default, all dependencies must be resolved before a command will proceed.  The user can override this policy using the enforce_dependencies option. 

SD supports two types of dependencies: prerequisites that must be installed and configured before the dependent fileset is installed and configured (respectively); and corequisites that must be installed and configured before the dependent is usable. 

Product Location and Multiple Versions

The swinstall command can install a software product to an alternate product location instead of the default product directory specified by the vendor.  (This directory location is the root directory of all the product’s files.) 

The swinstall command can also install multiple versions of a software product to a single target system, each in a unique product location. 

The software management commands, swlist, swverify, swconfig, and swremove allow a user to select a specific product from the multiple installed versions by specifying the product location as part of the software_selection.

Alternate Root Directory and Depot Directory

By default, the swinstall, swlist, swverify, and swremove commands operate on the primary root filesystem of a target host, namely "/".  The user can also specify an alternate root directory to these commands, meaning a directory other than "/" that will eventually be the root of some target host (e.g. building a test system by mounting its root filesystem). 

The swconfig command only operates on software installed to the primary root filesystem, "/". 

When operating on a depot, the swpackage, swcopy, swlist, swverify, and swremove commands by default use the depot located at /var/spool/sw.  The user can also specify an alternate depot directory to these commands. 

Disk Space Analysis

The swinstall, swcopy, and swpackage commands perform a disc space analysis on the target_selections to ensure that enough free disc space is available to perform the task.  The swremove command can also perform disk space analysis to help the user chose software to remove. 

Before performing any disc space analysis, the commands execute the mount(8) command to mount all filesystems listed in each target’s filesystem table (/etc/checklist or equivalent).  This action helps to ensure that files are not loaded (removed) into (from) a directory that may be below a future mount point.  The user can override this mounting policy using the mount_all_filesystems option. 

Control Scripts

The swinstall, swverify, swconfig, and swremove commands execute vendor-defined control script to perform checks and/or other tasks beyond those explicitly performed by the commands. 

For swinstall and swremove, a fileset and/or product can include a check script to perform an analysis of each target_selection (target host).  If this analysis fails, the script can prevent the fileset/product from being installed or removed. 

In addition, swinstall and swremove can execute scripts immediately before and immediately after the fileset/product has been installed or removed.  These scripts usually perform additional file install or remove operations. 

The swinstall, swconfig, and swremove commands will also execute configuration and unconfiguration scripts on an installed fileset/product to configure or unconfigure the system for the software. 

The swverify command will execute a verification script which can analyze the configured fileset/product to verify that it is configured properly. 

Flexible Policy Control

Many policies and behaviors for the SD commands can be controlled via the appropriate command options.  Options can be defined in an SD defaults file, specified on the command-line invocation of a command, or specified in the GUI. 

Software States

The SD commands transition products and filesets through a number of states.

During installation, software is transitioned through the following states: non-existent, TRANSIENT, INSTALLED, and CONFIGURED.  During removal, software is transitioned through these states: CONFIGURED, INSTALLED, TRANSIENT, and non-existent. 

When packaging or copying software into a depot, the software is transitioned through the following states: non-existent, TRANSIENT, and AVAILABLE.  When removing software from a depot, the software is transitioned through these states: AVAILABLE, TRANSIENT, and non-existent. 

If a task fails during any TRANSIENT state, the state is set to CORRUPT. 

Preview, Diagnostics and Logging

The swinstall, swcopy, swconfig, swpackage, and swremove commands support a preview mode, where the commands will proceed through the analysis phase, then exit.  (The swpackage command goes beyond the analysis phase but makes no changes to the target depot.) 

The preview mode only applies to non-interactive operations, since the GUIs wait for confirmation after analysis.  In the interactive mode, you can resolve invalid conditions that the commands discover before they actually begin loading or removing files. 

All commands, except for swlist and swpackage, log major events on the controller host, and detailed events on the target hosts.  The swlist command does no logging, while the swpackage command logs all events to the same logfile. 

Options

The following options are generally supported by the SD commands.  Options specific to any one SD command are documented in the manual page for that command. 

XToolKit Options
The interactive commands: swinstall, swcopy, and swremove support a subset of the standard X Toolkit options to control the appearance of the GUI.  See their manual pages for the specific options supported.  (Commands without a GUI do not support the X Toolkit options.) 

-i Runs the command in interactive mode (Graphical User Interface). 

-p Previews the task by executing the session through the analysis phase and exiting before the command begins to perform the actual task.  This option only applies to non-interactive sessions. 

-v Turns on verbose output to stdout.  (The command logfile is not affected by this option.)  By default, verbose output is enabled for all the SD commands. 

-r Causes the command to operate on target_selections which are alternate root directories (e.g. root filesystems other than /). 

-d Causes the command to operate on a software depot rather than a root directory. 

-s source Specifies which source depot, file, or tape from which software will be installed, copied, listed, or packaged. 

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

-X option_file
Read the session options and behaviors from option_file. These values defined in this file override the default values.

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

-t target_file
Read the list of target_selections from file instead of (or in addition to) the command line. 

-S session_file
Execute a swinstall, swcopy, swremove, swverify, or swconfig command based on the options and operands saved from a previous session, as defined in session_file.

Operands

The SD commands support the following syntax for each software_selection:

product[.subproduct][.fileset][,version][:location]

(The location is for swinstall only, and is used when changing the default product directory to a new location.) 

The version component supports either of these syntaxes:

[r=revision][,a=arch][,v=vendor][,vid=vendor_uuid][,l=location]

[instance_id]

The l=location component selects a product (component) at the specific location, and is useful only when multiple versions of a product are installed. 

The SD commands support this syntax for each target_selection:

[host][:][/directory]

EXTERNAL INPUTS AND INFLUENCES

Default Options

In addition to the standard options, several SD behaviors and policy options can be changed by editing the default values found in:

/var/adm/sw/defaults - the system-wide default values,

$HOME/.sw/defaults - the user-specific default values. 

Values must be specified in the defaults file using this syntax:

command.option=value

The default values can be overridden by specifying an options file with the -X option, or by specifying -x option=value on the command line. 

The following section lists all of the keywords supported by the SD commands.  The keywords that are supported for individual commands are also listed in each command’s manual page.  If a default value exists, it is listed after the "=". The commands that this option applies are also specified. 

Command Options
The following options apply to the SD commands independent of the actual task being performed.

source_type=directory
Defines the default source type, one of directory, tape, or file.  The source type derived from the -s option overrides this value. 

Applies to swinstall, swcopy, and swpackage. 

source_directory=/var/spool/sw
Defines the default location of the source depot.  This syntax can be host:path, except for swpackage which requires the simple path.  The -s option overrides this value. 

Applies to swinstall, swcopy, and swpackage. 

source_tape=/dev/swtape
Defines the default location of the source tape, usually the character-special file of a local tape device.  If the host:path syntax is used, the host must match the local host.  The -s option overrides this value. 

Applies to swinstall and swcopy. 

source_file=psf
Defines the default location of the source product specification file (PSF).  The host:path syntax is not allowed, only a valid path can be specified.  The -s option overrides this value. 

Applies to swpackage. 

target_type=directory
Defines the default type of depot to create, either directory or tape.  The target type derived from the -d option overrides this value. 

Applies to swpackage. 

target_directory=/var/spool/sw
Defines the default location of the target depot.

Applies to all SD commands that operate on depots. 

target_tape=/dev/swtape
Defines the default location of the target tape device (file).

Applies to swpackage. 

use_alternate_source=false
Empowers each target agent to use its own, configured alternate source, instead of the one specified by the user. If false, each target agent will use the same source, namely the source specified by the user and validated by the command.  If true, each target agent will instead use its own configured value for the source. 

Applies to swinstall and swcopy. 

select_local=true
If no target_selections are specified, select the default target_directory of the local host as the target_selection for the command. 

Applies to all commands except swpackage. 

logfile=/var/adm/sw/sw<command>.log
Defines the default log file for each SD command. (The agent logfiles are always located relative to the target depot or target root, e.g. /var/spool/sw/swagent.log and /var/adm/sw/swagent.log.) 

Applies to all SD commands. 

verbose=1
Controls the verbosity of a non-interactive command’s output. 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.  For swpackage, a value of 2 enables very verbose messaging to stdout. 

For the swlist command, a verbose listing includes all attributes that have ben defined for the appropriate level of each software_selection operand.  files The attributes are listed, one per line, prefaced by the attribute keyword. 

The -v option overrides this default. 

Applies to all SD commands. 

loglevel=1
Controls the log level for the events logged to the command logfile, the target agent logfile, and the source agent logfile. A value of 1 enables verbose logging to the logfiles.  A value of 2 enables very verbose logging to the logfiles. 

Applies to all SD commands except swlist. 

targets= Defines the default target_selections. There is no supplied default (see select_local above).  If there is more than target selection, they must be separated by spaces.  Targets are usually specified in a target input file, as operands on the command line, or in the GUI. 

Applies to all commands. 

software=
Defines the default software_selections.  There is no supplied default.  If there is more than software selection, they must be separated by spaces.  Software is usually specified in a software input file, as operands on the command line, or in the GUI. 

Applies to all commands. 

polling_interval=2
Defines the polling interval used by interactive (GUI) sessions.  It specifies how often each target agent will be polled to obtain status information about the task being performed.  When operating across wide-area networks, the polling interval can be increased to reduce network overhead.

Applies to swinstall, swcopy, and swremove. 

Target Task Options
The following options apply to the tasks being performed on the target_selections. They are used to affect the behavior of the swagent. 

level= Defines the level (or depth) of a listing produced by swlist: one of depot, product, subproduct, fileset, or file. 

Defines the level of ACLs to view/modify with swacl: one of host, depot, root, product, product_template, global_soc_template, or global_product_template. 

Applies to swlist and swacl. 

one_liner=revision title
Defines the attributes which are listed in the non-verbose listing produced by swlist.  See swlist(8) for details on this option.

Applies to swlist. 

create_target_path=true
Causes the agent to create the target directory if it does not already exist. If set to false, a new target directory will not be created.  This option can prevent the erroneous creation of new target depots. 

Applies to swinstall and swcopy. 

mount_all_filesystems=true
By default, the SD commands attempt to mount all filesystems in the /etc/checklist file at the beginning of the analysis phase, to ensure that all listed filesystems are mounted before proceeding.  This policy helps to ensure that files are not loaded into a directory that may be below a future mount point, and that the expected files are available for a remove or verify operation. 

If set to false, the mount operation is not attempted, and no check of the current mounts is performed. 

Applies to swinstall, swcopy, swconfig, swverify, and swremove. 

allow_incompatible=false
Requires that the software products which are being installed be "compatible" with the target selections.  (All of the target selections must match the list of supported systems defined for each selected product.)  If set to true, target compatibility is not enforced. 

Applies to swinstall, swconfig and swverify. 

enforce_dependencies=true
Requires that all dependencies specified by the software_selections be resolved either in the specified source, or at the target_selections themselves. 

The swinstall, swconfig, and swcopy commands will not proceed unless the dependencies have also been selected or already exist at the target in the correct state (INSTALLED, CONFIGURED, or AVAILABLE).  This prevents unusable software from being installed on the system.  It also ensures that depots contain usable sets of software. 

For swremove, if a selected fileset has dependents (i.e. other software depends on the fileset) and they are not selected, do not remove the selected filesets. 

If set to false, dependencies will still be checked, but not enforced.  Corequisite dependencies, if not enforced, may keep the selected software from working properly. Prerequisite dependencies, if not enforced, may cause the installation or configuration to fail. 

Applies to swinstall, swcopy, swconfig, swverify, and swremove. 

autoreboot=false
Prevents the installation of software requiring a reboot from the non-interactive (command line) interface. If set to true, then this software can be installed and the target system(s) will be automatically rebooted. 

Applies to swinstall. 

reinstall=false
When re-installing (or re-copying) an existing version of a fileset, this option causes that fileset to be skipped, i.e. not re-installed. If set to true, the fileset will be re-installed (re-copied). 

Applies to swinstall and swcopy. 

allow_downdate=false
Prevents the installation of an older revision of fileset that already exists at the target(s).  (Many software products do not support "downdating".)  If set to true, the older revision can be installed. 

Applies only to swinstall. 

allow_multiple_versions=false
Prevents the installation or configuration of another, independent version of a product when a version already is already installed or configured at the target.

If set to true, another version of an existing product can be installed into a new location, or can be configured in its new location.  Multiple versions can only be installed if a product is locatable.  Multiple configured versions will not work unless the product supports it. 

Applies to swinstall, swconfig, and swverify. 

enforce_dsa=true
Prevents a command from proceeding past the analysis phase if the disk space required is beyond the available free space of the impacted filesystem(s).  If set to false, then the install, copy, or package operation will use the filesystems’ minfree space and may fail because it reaches the filesystem’s absolute limit. 

Applies to swinstall, swcopy, and swpackage. 

enforce_scripts=true
If a fileset/product checkinstall or checkremove script fails (i.e. returns with exit code 1), none of the filesets in that product will be installed or removed.  If set to false, the install or remove operation will proceed even when a check script fails. 

Applies to swinstall and swremove. 

defer_configure=false
Causes swinstall to automatically configure the software_selections after they are installed.  When an alternate root directory is specified, swinstall never performs the configuration task, since only hosts using the software should be configured.  If set to true, this option allows configuration to be deferred even when the root directory is /. 

When installing a second (third, ...) version of a product, it will not be configured if another version is already configured.  The swconfig command must be run separately. 

Applies to swinstall. 

reinstall_files=true
Causes all the files in a fileset to always be re-installed, re-copied, or re-packaged, even when the file already exists at the target and is identical to the new file. If set to false, files that have the same checksum (see next option), size and timestamp will not be re-installed, re-copied, or re-packaged.  This check enhances performance on slow networks or slow discs. 

Applies to swinstall, swcopy, and swpackage. 

reinstall_files_use_cksum=true
This option affects the operation when the reinstall_files option is set to false.  It causes the checksums of the new and old file to be computed and compared to determine if the new file should replace the old one.  (The checksum is slower, but is a more robust way to check for files being equivalent.)  If set to false, the checksums are not computed, and files are (not) reinstalled based only on their size and timestamp.  For swpackage, the default value for this option is false. 

Applies to swinstall, swcopy, and swpackage. 

compress_files=false
If set to true, files will be compressed before transfer from a remote source and uncompressed after transfer.  This will enhance performance on slower networks. 

Applies to swinstall and swcopy. 

write_remote_files=false
Prevents the installation, copying, or packaging of files to a target which exists on a remote (NFS) filesystem.  Also prevents the removal of files from a remote filesystem. All files destined for (or already on) a remote filesystem will be skipped.

If set to true and if the superuser has write permission on the remote filesystem, the remote files will not be skipped, but will be installed, copied, packaged, or removed.  Applies to swinstall, swcopy, swpackage, and swremove. 

autorecover_product=false
Causes swinstall to remove the original files as they are updated.  If an error occurs during the installation (e.g. network failure), then the original files are lost, and the installation must be re-tried. 

If set to true, all files are saved as backup copies until all filesets in the current product loading are complete; then they are removed.  At the cost of a temporary increase in disk space and slower performance, this allows for automatic recovery of of the original filesets in that product if the load fails. 

Applies to swinstall. 

register_new_depot=true
Causes swcopy to register a newly created depot with the local swagentd.  This action allows other SD commands to automatically "see" this depot.  If set to false, a new depot will not be automatically registered.  (It can be registered later with the swdepot command.) 

Applies to swcopy. 

reconfigure=false
Prevents software which is already in the CONFIGURED state from being reconfigured. If set to true, CONFIGURED software can be reconfigured. 

Applies to swconfig. 

check_permissions=true
Causes swverify to verify the mode, owner, UID, group, and GID attributes of installed files.  If set to false, these attributes are not verified. 

Applies to swverify. 

check_contents=true
Causes swverify to verify the timestamp, size, and checksum attributes of files.  If set to false, these attributes are not verified. 

Applies to swverify. 

check_scripts=true
Causes swverify to run the fileset/product verify scripts for installed software.  If set to false, these scripts are not executed. 

Applies to swverify. 

check_requisites=true
Causes swverify to verify that the prerequisite and corequisite dependencies of the software selections are being met.  If set to false, these checks are not performed. 

Applies to swverify. 

check_volatile=false
Causes swverify to not verify those files marked as volatile (i.e. can be changed).  If set to true, volatile files are also checked (for installed software). 

Applies to swverify. 

follow_symlinks=false
Do not follow symbolic links in the package source files, but include the symbolic links in the packaged product(s). If set to true, follow symbolic links in the package source files and include the file(s) they reference in the packaged product(s). 

Applies to swpackage. 

include_file_revisions=false
Do not include each source file’s revision attribute in the product(s) being packaged. Because this operation is time consuming, by default the revision attributes are not included. If set to true, swpackage will execute what(1) and possibly ident(1) (in that order) to try to determine a file’s revision attribute. 

Applies to swpackage. 

package_in_place=false
If set to true, swpackage will package the specified products such that the target depot will not contain the files that make up a product.  Instead, swpackage inserts references to the original source files used to build a product.  This behavior allows products to be packaged without consuming the full disc space of copying all the source files into the target depot. 

create_target_acls=true
If creating a target depot, swpackage will create Access Control Lists (ACLs) for the depot (if it is new) and all products being packaged into it.  If set to false, and if the user is the superuser, swpackage will not create ACLs.  (The swpackage command never creates ACLs when software is packaged on to a distribution tape.)  Applies to swpackage. 

media_capacity=1330
If creating a distribution tape, this keyword specifies the capacity of the tape in Mbytes.  This option is required if the media is not a DDS tape or a disk file.  Without this option, swpackage sets the size to 1330 Mbytes for tape and "free space up to minfree" on a disk file. 

Applies to swpackage. 

Daemon and Agent Options
The following options apply to the SD daemon and agent.

agent=/usr/lbin/swagent
The location of the agent program invoked by the daemon.

Applies to swagentd. 

max_agents=-1
The maximum number of agents that are permitted to run simultaneously.  The value of -1 means that there is no limit.

Applies to swagentd. 

alternate_source=
Defines the alternate source which the agent will use when the user_alternate_source option is set to true.  The alternate source is specified using the host:path syntax.  If the host portion is not specified, then the local host is used.  If the path portion is not specified, then the path sent by the command is used. 

Applies to swagent. 

kernel_build_cmd=/usr/lbin/kernel_build
Defines the script called by the agent for kernel building.

Applies to swagent. 

reboot_cmd=/etc/reboot
Defines the command called by the agent to reboot the system.

Applies to swagent. 

mount_cmd=/etc/mount
Defines the command called by the agent to mount all filesystems.

Applies to swagent. 

compress_cmd=/usr/bin/compress
Defines the command called by the source agent to compress files before transmission.

Applies to swagent. 

uncompress_cmd=/usr/bin/uncompress
Defines the command called by the target agent to uncompress files after transmission.

Applies to swagent. 

Remote Procedure Call Options
These options apply to the DCE Remote Procedure Call used by most of the SD commands:

rpc_binding_info=ncadg_ip_udp:[2121]
Defines the protocol sequence(s) and endpoint(s) which should be used to contact swagentd.  This value should be consistent among all hosts that work together.  This value can be a list of one or more entries of the following form:

- A DCE string binding containing a protocol sequence and an endpoint.  The syntax is: protocol_sequence:[endpoint]. 

- The name of a DCE protocol sequence with no endpoint specified.  The syntax is: protocol_sequence, for example ncadg_ip_udp or ncacn_ip_tcp.  (A trailing : can be attached to the protocol sequence, it has no effect.)  Since no endpoint is specified, the DCE endpoint mapper rpcd must be running and will be used to find the endpoint registered by the swagentd. 

- The literal string all.  This entry means to use (try) all protocol sequences supported by the DCE RPC.  It should be the only entry in the list.  The DCE endpoint mapper rpcd must be running. 

Applies to all commands except swpackage. 

rpc_timeout=5
Relative length of the communications timout. This is a value in the range from 0 to 9 and is interpreted by the DCE RPC.  Higher values mean longer times; you may need a higher value for a slow or busy network.  Lower values will give faster recognition on attempts to contact hosts that are not up, or are not running the swagentd. 

Applies to all commands except swpackage. 

Session File

Each invocation of an SD command defines a task session.  Most SD commands automatically save options, source information, software selections, and target selections before the task actually commences.  This session can be re-executed if the command terminates before the session completes.  This session is saved to the file $HOME/.sw/sessions/<command>.last. 

In an interactive session, session information can be saved into a file at any time for reuse in a subsequent session. 

The session file uses the same syntax as the defaults files.  Values in a defaults file are overridden by values from a session file.  These are in turn overidden by the corresponding command line option or operand. 

Environment Variables

The swagent program sets these environment variables for use by the control scripts being executed:

SW_PATH

A PATH variable which defines a minimum set of commands available to for use in a control script (e.g.  /bin:/usr/bin). 

SW_ROOT_DIRECTORY

Defines the root directory in which the session is operating, either "/" or an alternate root directory.  This variable tells control scripts the root directory in which the products are installed.  A script must use this directory as a prefix to SW_LOCATION to locate the product’s installed files. The configure script is only run when SW_ROOT_DIRECTORY is "/". 

SW_LOCATION

Defines the location of the product, which may have been changed from the default product directory.  When combined with the SW_ROOT_DIRECTORY, this variable tells scripts where the product files are located. 

SW_CONTROL_DIRECTORY

Defines the current directory of the script being executed, either a temporary catalog directory, or a directory within in the Installed Products Database (IPD).  This variable tells scripts where other control scripts for the software are located (e.g. subscripts). 

Signals

The SD commands catch the signals SIGQUIT and SIGINT.  If these signals are received, the command prints a message, sends a Remote Procedure Call (RPC) to the agents to wrap up, and then exits. 

The agent ignores SIGHUP, SIGINT, and SIGQUIT.  It immediately exits gracefully after receiving SIGTERM, SIGUSR1, or SIGUSR2.  Killing the agent may leave corrupt software on the system, and thus should only be done if absolutely necessary.  Note that when an SD command is killed, the agent does not terminate until completing the task in progress. 

The daemon ignores SIGHUP, SIGINT and SIGQUIT.  It immediately exits gracefully after receiving SIGTERM and SIGUSR2.  After receiving SIGUSR1, it waits for completion of a copy or remove from a depot session before exiting, so that it can register or unregister depots.  Requests to start new sessions are refused during this wait. 

Locking

SD commands use a common locking mechanism for reading and modifying both root directories and software depots. This mechanism allows multiple readers but only one writer on a root or depot. 

The SD commands which modify software in an (alternate) root directory are restricted from simultaneous modification using fcntl(2) locking on the file

var/adm/sw/products/swlock

relative to the root directory (e.g.  /var/adm/sw/products/swlock). 

The SD commands which modify software in a depot are restricted from simultaneous modification using fcntl(2) locking on the file

catalog/swlock

relative to the depot directory (e.g.  /var/spool/sw/catalog/swlock). 

All SD commands set fcntl(2) read locks on roots and depots using the swlock file mentioned above.  When a read lock is set, it prevents other SD commands from performing modifications (i.e. from setting write locks). 

RETURN VALUES

Each SD command invocation returns:

0 The sw<task> successfully completed. 

1 The sw<task> failed on all target_selections.

2 The sw<task> failed on some target_selections.

DIAGNOSTICS

The swinstall, swcopy, swremove, swverify, and swconfig commands support a preview mode, where operation will proceed through the analysis of each target_selection, then exit before the actual task is performed.

The swpackage command also supports a preview mode, its operation will proceed through the analysis and package phases without modifying the target depot (tape). 

Preview is only applicable for non-interactive operation, since the interactive commands wait for confirmation after analysis.  In the interactive mode, you can resolve invalid conditions that the commands discover before they actually begin loading or removing files. 

Standard Output

When non-interactive, the commands write messages for significant events.  These events include:

• a begin and end task message,

• a message for starting the task on each host, and

• a message for completing the task on each host. 

When the verbose option is set, summary messages about the task are also sent to the standard output. 

Standard Error

When non-interactive, the commands also write messages for the following significant error events:

• a message for each host failing analysis and

• a message for each host failing the actual task. 

Logging

All commands log major events on the host where the command was invoked.  They log detailed events to the swagent log associated with each target_selection.

Command Log
The commands log messages to /var/adm/sw/sw<task>.log.  (The user can specify a different logfile by modifying the logfile option.) 

Target Log
A swagent process performs the actual swinstall, swcopy, swremove, swverify, swacl, and swconfig operation at each target_selection. For operations on target root objects, the swagent logs messages to the file var/adm/sw/swagent.log beneath the root directory (e.g.  / or an alternate root directory).  For operations on target depot objects, the swagent logs messages to the file swagent.log beneath the depot directory (e.g.  /var/spool/sw). 

The swagentd running on a host logs events to the file /var/adm/sw/swagentd.log. 

FILES

/usr/sbin/sw*

The SD commands. 

/usr/lbin/swagent

The SD agent. 

/usr/lib/nls/$LANG/sw*.cat

The SD message catalogs. 

/var/adm/sw/

The directory which contains all of the configurable (and non-configurable) data for SD.  This directory is also the default location of logfiles. 

/var/adm/sw/security/

The directory which contains ACLs for the system itself, template ACLS, and the secrets file used to authenticate remote requests. 

/var/adm/sw/host_object

The file which stores the list of depots registered at the local host. 

/var/adm/sw/ui/

The directory which contains the description files used by the SD Graphical User Interfaces (GUIs). 

/var/adm/sw/help/

The directory which contains the help files used by the SD GUIs’ on-line help facility. 

/var/adm/sw/defaults

Contains the system-wide default values for some or all SD options. 

$HOME/.sw/defaults

Contains the user-specific default values for some or all SD options. 

$HOME/.sw/sessions/

Contains session files automatically saved by the SD commands, or explicitly saved by the user. 

/var/adm/sw/products/

The Installed Products Database (IPD), a catalog of all products installed on a system. 

/var/spool/sw/

The default location of a source and target software depot. 

/dev/swtape

The default location of a source and target tape. 

/var/adm/sw/examples/

The directory containing an example depot and example swpackage data. 

/etc/newconfig/sd/

The directory containing the configurable data shipped for the SD product, which is conditionally copied into /var/adm/sw/ based on the existing configruation. 

/usr/OV/registration/$LANG/sd.reg

The registration file which integrates SD into the HP OpenView Network Node Manager. 

/usr/OV/help/$LANG/sd/

The directory which contains the help files used by the SD integration into OpenView. 

AUTHOR

The HP OpenView Software Distributor was developed by the Hewlett-Packard Company. 

SEE ALSO

swacl(8) , swagentd(8) , swconfig(8) , swcopy(8) , swdepot(8) , swinstall(8) , swlist(8) , swpackage(8) , swremove(8) , swverify(8) , pushAgent(8) , swpackage(4) , sd(4) , and the HP OpenView Software Distributor Administrator’s Guide.

Hewlett-Packard Company  —  Software Distributor 2.0

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026