HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)
s
swreg(1M) swreg(1M)
The environment variables that affect the
swreg command are:
LANG Determines the language in which messages are displayed. If LANG is not specified or
is set to the empty string, a default value of
C is used. See the lang(5) man pages by
typing
man 5 lang for more information.
NOTE: The language in which the SD agent and daemon log messages are displayed is
set by the system configuration variable script,
/etc/rc.config.d/LANG
.For
example,
/etc/rc.config.d/LANG
, must be set to
LANG=ja_JP.SJIS
or
LANG=ja_JP.eucJP
to make the agent and daemon log messages display in
Japanese.
LC_ALL Determines the locale to be used to override any values for locale categories specified by
the settings of
LANG or any environment variables beginning with
LC_.
LC_CTYPE Determines the interpretation of sequences of bytes of text data as characters (e.g.,
single-versus multibyte characters in values for vendor-defined attributes).
LC_MESSAGES
Determines the language in which messages should be written.
LC_TIME Determines the format of dates (create_date and mod_date) when displayed by swlist.
Used by all utilities when displaying dates and times in
stdout, stderr, and log-
ging
.
TZ Determines the time zone for use when displaying dates and times.
Signals
The swreg command catches the signals SIGQUIT and SIGINT. If these signals are received,
swreg
prints a message, sends a Remote Procedure Call (RPC) to the daemons to wrap up, and then exits.
RETURN VALUES
The swreg command returns:
0 The objects_to_register were successfully (un)registered.
1 The register or unregister operation failed on all target_selections.
2 The register or unregister operation failed on some target_selections.
DIAGNOSTICS
The
swreg command writes to stdout, stderr, and to the daemon logfile.
Standard Output
The swreg command writes messages for significant events. These include:
• a begin and end session message,
• selection and execution task messages for each target_selection.
Standard Error
The
swreg command writes messages for all WARNING and ERROR conditions to stderr.
Logging
The swreg command logs summary events at the host where the command was invoked. It logs events
about each (un)register operation to the swagentd logfile associated with each target_selection.
swagentd Disabled
If the
swagentd daemon has been disabled on the host, it can be enabled by the host’s system administra-
tor by setting the SW_ENABLE_SWAGENTD entry in /etc/rc.config.d/swconfig
to 1 and exe-
cuting
/usr/sbin/swagentd -r.
EXAMPLES
Create a new depot with swpackage, then register it with swreg:
swpackage -s psf -d /var/spool/sw
swreg -l depot /var/spool/sw
Unregister the default depot at several hosts:
HP-UX 11i Version 3: February 2007 − 5 − Hewlett-Packard Company 523