swdepot(8) — SD 2.0 Release
NAME
swdepot − Register or unregister software depots
SYNOPSIS
swdepot [-v] [-u] [-x option=value] [-X option_file] [-t target_file] [-S session_file] [ @ target_selections]
DESCRIPTION
The swdepot command controls the visibility of software depots to users who are performing software management tasks. By default, the swcopy command registers newly created depots. The swremove command unregisters a depot when or if the depot is empty. The user invokes swdepot to explicitly (un)register a depot when the automatic behaviors of swcopy and swremove do not suffice. For example:
• making a CD-ROM or other removable media available as a registered depot.
• registering a depot created directly by swpackage.
• unregistering a depot without removing it with swremove.
Options
The swdepot command supports the following options:
-u Causes swdepot to unregister the specified depot(s) instead of registering it (them).
-v Turns on verbose output to stdout. (The swdepot logfile is not affected by this option.) Verbose output is enable by default, see the verbose option below.
-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.
-t target_file Read the list of target_selections from target_file instead of (or in addition to) the command line.
-S session_file Execute swdepot based on the options and operands saved from a previous session, as defined in session_file.
Operands
The swdepot command supports the following syntax for each target_selection:
[host][:][/directory]
Each operand specifies a depot to be (un)registered.
EXTERNAL INFLUENCES
Defaults File
In addition to the standard options, several swdepot 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:
swdepot.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.
Command Options
These defaults are used to define sources and target as well as output (stdout and logging):
swdepot.target_directory=/var/spool/sw
Defines the default location of the target depot.
swdepot.verbose=1
Controls the verbosity of the swdepot 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.
swdepot.loglevel=1
Controls the log level for the events logged to the command logfile, and the target daemon logfile. A value of 1 enables verbose logging to the logfiles. A value of 2 enables very verbose logging to the logfiles.
swdepot.logfile=/var/adm/sw/swdepot.log
This is the default command log file for the swdepot command.
swdepot.select_local=true
If no target_selections are specified, select the default target_directory at the local host as the target of the command.
swdepot.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.
Remote Procedure Call Options
These options apply to the DCE Remote Procedure Call used by swdepot:
swdepot.rpc_binding_info=ncadg_ip_udp:[2121]
Defines the protocol sequence(s) and endpoint(s) which will be used to contact swagentd. This value should be consistent among all hosts that work together. See sd(5) for details on specifying this option.
swdepot.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.
Session File
Each invocation of the swdepot command defines a configuration session. The invocation options, source information, software selections, and target hosts are saved before the configuration task actually commences. This session is saved to the file $HOME/.sw/sessions/swdepot.last. This session can be re-executed by using the file as input to swdepot (with the -S option.)
The session file uses the same syntax as the defaults file. Values in the defaults file are overridden by values from a session file, if specified. These are in turn overidden by the corresponding command line option or parameter(s), if specified.
Environment Variables
The swdepot command does not use environment variables.
Signals
The swdepot command catches the signals SIGQUIT and SIGINT. If these signals are received, swdepot prints a message, sends a Remote Procedure Call (RPC) to the daemons to wrap up, and then exits.
RETURN VALUES
The swdepot command returns:
0 The target_selections were successfully (un)registered.
1 The (un)register operation failed on all target_selections.
2 The (un)register operation failed on some target_selections.
EXAMPLES
Create a new depot with swpackage, then register it with swdepot:
swpackage -s psf -d /var/spool/sw
swdepot @ /var/spool/sw
Unregister the default depot at several hosts:
swdepot -u @ hostA hostB hostC
Unregister a specific depot at the local host:
swdepot -u @ /cdrom
FILES
/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/host_object
The file which stores the list of depots registered at the local host.
/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.
AUTHOR
swdepot was developed by the Hewlett-Packard Company.
SEE ALSO
swacl(8), swagentd(8), swconfig(8), swcopy(8), swinstall(8), swpackage(8), swremove(8), swverify(8), swpackage(4), sd(4), sd(5), and the HP OpenView Software Distributor Administrator’s Guide.
Hewlett-Packard Company — Software Distributor 2.0