HP-UX Reference (11i v2 07/12) - 1M System Administration Commands N-Z (vol 4)
s
swinstall(1M) swinstall(1M)
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.
Locking
SD commands use a common locking mechanism for reading and modifying the Installed Products Data-
base (IPD) and software depots. This mechanism allows multiple readers but only one writer on an IPD or
depot:
Write Locks
swinstall commands that modify the IPD are restricted from simultaneous modification using
fcntl() locking on the file <IPD location>
/swlock (for example,
/var/adm/sw/products/swlock
).
swcopy commands that modify a software depot are restricted from simultaneous modification using
fcntl() locking on the file <depot directory>
/catalog/swlock (for example,
/var/spool/sw/catalog/swlock
).
Read Locks
Both
swinstall and swcopy commands set fcntl() read locks on source depots using the
swlock file mentioned above. When a read lock is set, it prevents all SD commands from performing
modifications (that is, from setting write locks).
Terminal Support
For in-depth information about terminal support refer to:
• The Software Distributor Administration Guide manual
• 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
swinstall or swcopy session always returns 0. A non-interactive
swinstall or
swcopy session returns:
0 The software_selections were successfully installed/copied.
1 The install/copy operation failed on all target_selections.
2 The install/copy operation failed on some target_selections.
DIAGNOSTICS
The
swinstall and swcopy commands write to stdout, stderr, and to specific logfiles.
Standard Output
An interactive swinstall or swcopy session does not write to stdout. A non-interactive swinstall
or swcopy 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 swinstall or swcopy session does not write to stderr. A non-interactive swinstall
or swcopy session writes messages for all WARNING and ERROR conditions to stderr.
Logging
Both interactive and non-interactive swinstall and swcopy sessions log summary events at the host
where the command was invoked. They log detailed events to the swagent logfile associated with each
target_selection.
Command Log
The swinstall and swcopy commands log all stdout and stderr messages to the the logfile
470 Hewlett-Packard Company − 19 − HP-UX 11i Version 2: December 2007 Update