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 4 Registering Software Depots

Registering Your Software (swreg)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Just as with any other SD-UX command, swreg requires that you assemble options, targets and defaults into a command line or use command options to "point" to files containing targets, default behavior changes and other variables.

The swreg command uses the command line interface only. There is no Graphical User Interface for swreg.

Syntax

The syntax for swreg is:

swreg -l level [-u] [-v] [ -C session_file] [-f object_file]
[-S session_file] [-t target_file] [-x option=value]
[-X option_file]
[objects_to_(un)register][@ target_selections]

Examples

To create a new depot with swpackage, then register it with swreg:

swpackage -s psf -d /var/spool/sw swreg -l depot /var/spool/sw

To unregister a specific depot at the local host:

swreg -u -l depot/cdrom

To unregister a CD-ROM depot mounted at /mnt/cd, type:

swreg -l depot -u @ /mnt/cd

To register the same depot (mounted at /mnt/cd on the local host) as a depot to be available on the network, type:

swreg -l depot @ /mnt/cd

(The @ sign is optional on the local host.)

Command Options

The swreg command supports the following options:

Option Action

-l level (required)

List all objects at the specified level. Only one level may be specified. Supported levels are:

root

Show the root level (all the roots on the host).

shroot

Show shared roots on the local host.

prroot

Show private roots on the local host.

depot

Show depots on the local host.

-u

Unregister the depot.

-v

Cause verbose logging to stdout.

-C session_file

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

-f object_file

Read a list of objects to (un)register from a file.

-S session_file

Run swreg based on a previous session.

-t target_file

Read the list of target hosts on which to register the depot or root objects from the target_file instead of (or in addition to) the command line.

-x option=value

Set a specific option value to value. Multiple -x options can be specified.

-X option_file

Read a list of options and behaviors from a separate file.

Command Operands

The swverify command supports the standard software selection syntax. For more details on software_selections syntax, see “Command Operands ”.

The software_selections and target_selection operands are:

Operand Action

objects_to_(un)register


Specifies the path to the object to be registered or unregistered.

target_selections

Specifies the absolute pathname of the depot to be operated on using the host:path syntax.

Changing Default Options

In addition to the command-line options listed above, several swreg behaviors and policy options can 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.

Table 4-1 “Registration Default Options ” shows the default options supported by swreg. See Appendix A “Default Options and Keywords ” for a complete listing and description of these defaults.

Table 4-1 Registration Default Options

distribution_target_directory =/var/spool/sw
level=
logfile=/var/adm/sw/swreg.log
logdetail=false
loglevel=1
log_msgid=0
objects_to_register

rpc_binding_info=ncacn_ip_tcp:2121 ncadg_ip_udp:[2121]

rpc_timeout=5

select_local=true

targets=

verbose=1

 

Using Session Files

Each invocation of the swreg command defines a registration session. The invocation options, source information, software selections, and target hosts for this session are saved before the installation or copy 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/swconfig.last. This file is overwritten at each invocation of swreg.

You can save a session configuration to a specific file by executing swreg 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 swreg.

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

Registering Depots

The registration of depots (and roots) determines which hosts are available for software management tasks (that is, which hosts have a daemon/agent running). It enables the controller system to retrieve and present (via swlist) a list of existing depots or roots from which a selection can be made. Registration information consists of the depot or root's identifier (its path in the host file system).

Note that registration does not imply access enforcement. Access enforcement is left to security (see Chapter 9 “Controlling Access to Software Objects”).

Authorization

To register a new depot or to unregister-register an existing depot, swreg requires read permission on the depot in question and write permission on the host. To unregister a registered depot, the swreg command requires write permission on the depot. See Chapter 9 “Controlling Access to Software Objects” for more information on permissions.

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