HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)
s
swask(1M) swask(1M)
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:
swask -s swposix:/tmp/sample.depot.1 -c /tmp/test1.depot Product1
Run request scripts from remote depot /tmp/sample.depot.1 on host swposix only when a
response file is absent, create the catalog
/tmp/test1.depot on the local controller machine, and
place the response file (named response) in the catalog:
swask -s swposix:/tmp/sample.depot.1 -c /tmp/test1.depot
-x ask=as_needed \*
FILES
$HOME/.swdefaults
Contains the user-specific default values for some or all SD options. If this file does not exist, SD
looks for user-specific defaults in $HOME/.sw/defaults.
$HOME/.sw/sessions/
Contains session files automatically saved by the SD commands or explicitly saved by the user.
446 Hewlett-Packard Company − 7 − HP-UX 11i Version 3: February 2007