HP-UX Reference (11i v2 07/12) - 1M System Administration Commands N-Z (vol 4)

s
swask(1M) swask(1M)
SW_ROOT_DIRECTORY
Defines the root directory in which the session is operating, either "/" or an alternate root
directory. This variable tells control scripts the root directory in which the products are
installed. A script must use this directory as a prefix to
SW_LOCATION to locate the
product’s installed files. The configure script is only run when
SW_ROOT_DIRECTORY
is
/.
SW_SESSION_OPTIONS
Contains the pathname of a file containing the value of every option for a particular com-
mand, including software and target selections. This lets scripts retrieve any command
options and values other than the ones provided explicitly by other environment variables.
For example, when the file pointed to by
SW_SESSIONS_OPTIONS
is made available to a
request script, the targets option contains a list of software_collection_specs for all targets
specified for the command. When the file pointed to by
SW_SESSIONS_OPTIONS
is
made available to other scripts, the targets option contains the single
software_collection_spec for the targets on which the script is being executed.
SW_SOFTWARE_SPEC
This variable contains the fully qualified software specification of the current product or
fileset. The software specification allows the product or fileset to be uniquely identified.
RETURN VALUES
swask returns one of these codes:
0 Command successful on all targets
1 Command failed on all targets
2 Command failed on some targets
DIAGNOSTICS
The swask command writes to stdout, stderr, and to the swask logfile.
Standard Output
An interactive swask session does not write to stdout. A non-interactive
swask 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
swask session does not write to stderr. A non-interactive
swask session writes messages
for all WARNING and ERROR conditions to stderr.
Logging
Both interactive and non-interactive
swask sessions log summary events at the host where the command
was invoked. They log detailed events to the
swask.log logfile associated with each target_selection.
Command Log
The
swask command logs all stdout and stderr messages to the the logfile
/var/adm/sw/swask.log. Similar messages are logged by an interactive swask session. You
can specify a different logfile by modifying the
logfile option.
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
Run all request scripts from the default depot (/var/spool/sw) depot and write the response file
(named response) back to the same depot:
swask -s /var/spool/sw \*
Run the request script for Product1 from depot /tmp/sample.depot.1 on remote host swposix,
create the catalog /tmp/test1.depot on the local controller machine, and place the response file
(named response) in the catalog:
HP-UX 11i Version 2: December 2007 Update 7 Hewlett-Packard Company 439