swremove.1m (2012 03)
s
swremove(1M) swremove(1M)
SW_ALLOW_LOCAL_SRP_OPS
This variable is usually not set. If it is set to TRUE or 1, this variable allows
swremove to run on a system container. If a value other than TRUE or 1 is
specified, or if a value is not specified, a system container does not support
swremove.
Signals
The
swremove command catches the signals SIGQUIT, SIGINT, and SIGUSR1. If these signals are
received, the command prints a message, sends a Remote Procedure Call (RPC) to the agents to wrap up
after completion, 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 if necessary. Requests to start
new sessions are refused during this wait.
Each agent will complete the removal task (if the execution phase has already started) before it wraps up.
This avoids leaving software in a corrupt state.
Terminal Support
For in-depth information about terminal support refer to:
• The Software Distributor Administration Guide .
• Start the GUI or TUI, select the Help menu, then select the Keyboard... option to access the Key-
board Reference Guide.
RETURN VALUES
An interactive
swremove session always returns 0. A non-interactive
swremove session returns:
0 The software_selections were successfully removed.
1 The remove operation failed on all target_selections.
2 The remove operation failed on some target_selections.
DIAGNOSTICS
The
swremove command writes to stdout, stderr, and to specific log files.
Standard Output
An interactive
swremove session does not write to stdout. A non-interactive
swremove session writes
messages for significant events. These include:
• a begin and end session message,
• selection, analysis, and execution task messages for each target_selection.
Standard Error
An interactive
swremove session does not write to stderr. A non-interactive swremove session writes
messages for all WARNING and ERROR conditions to stderr.
Logging
Both interactive and non-interactive
swremove sessions log summary events at the host where the com-
mand was invoked. They log detailed events to the swagent logfile associated with each
target_selection.
Command Log
A non-interactive
swremove session logs all stdout and stderr messages to the the logfile
/var/adm/sw/swremove.log. Similar messages are logged by an interactive swremove ses-
sion. The user can specify a different logfile by modifying the logfile option.
Target Log
A
swagent process performs the actual remove operation at each target_selection. When remov-
ing installed software, the swagent logs messages to the file var/adm/sw/swagent.log
beneath the root directory (for example,for example,for example,for example, / or an alternate root
directory). When removing available software (within a depot), the swagent logs messages to the
HP-UX 11i Version 3: March 2012 − 13 − Hewlett-Packard Company 13