HP-UX Software Assistant Administration Guide (5900-3003, March 2013)

Example: Use SWA With a Gateway
This example requires SWA version C.02.80 or later. Download the latest version of SWA from
http://www.hp.com/go/swa-download.
If you would like to use SWA without direct internet access, you can use the download_cmd
extended option and a gateway server to access the catalog and patch files. This gateway can
be a non-HP-UX system.
We will use GET to download the catalog, since the catalog is not very large, and use wget within
a script to download the patches.
In SWA versions C.02.80 and later, you may use the string %url to represent the web locations
SWA uses to complete any download. SWA will substitute URL destinations for the %url target
string as it works.
Since the example swa get command does not use the %url target string, SWA appends the
URL destination to the end of the command, which becomes the script argument.
The following procedure is to be run on the system to be analyzed.
1. Create an inventory of the local system, then download the catalog using the gateway system,
run an analysis, and create a report:
# swa report -x download_cmd="ssh user@gateway /opt/perl/bin/GET \"%url\""
2. Review the recommended actions and issues.
3. Download patches using the gateway system and make a depot on the local system:
# swa get -t target_depot -x download_cmd='/usr/local/bin/myGetScript.sh'
where myGetScript.sh could be
#! /usr/bin/sh
URL=$1
ssh user@gateway 'wget O \'$URL\' '
4. Continue with the patch installation procedure as outlined in Chapter 3 (page 11).
TIP: In SWA C.02.85 and later, you can use the extended option url_target to change the
target string from %url to something else.
For more information on download_cmd, see swa-get(1M), swa-report(1M), and swa-step(1M).
Running SWA on a system without access to the Internet
Before you begin, see if the use of a proxy or gateway will allow indirect access to the Internet.
See “Using the download_cmd extended option” (page 23) for information on using a gateway.
See “Using proxy servers with Software Assistant” (page 23) for information on using proxies.
If you must run SWA on a system that does not have Internet access, you can obtain the catalog
and patches using a system connected to the Internet, and then transfer the downloaded files to
the protected system using media or ssh. Required patches will have to be manually requested
and downloaded from the HPSC at http://www.hp.com/go/hpsc. You can run SWA without any
network access whatsoever by using media to transfer the files from the system connected to the
Internet. You can also print the system's Action report and carry it to a system with Internet access
when downloading patches.
Example: Using SWA Without Internet Access
This example requires SWA version C.02.80 or later.
24 Networking options