I use Solaris Recommended patch bundles to patch my production servers, and like to use the following shell function to retrieve the latest bundle (it saves some typing):
getpatch () {
RB="10_Recommended.zip"
if [ "$1" != "" ]
then
SPWD=$PWD
cd $1
if [ -f ${RB} ]
then
rm -rf ${RB}
fi
echo "Grabbing the latest recommended bundle ..."
wget --passive-ftp ftp://sunsolve.sun.com/patchroot/clusters/${RB}
cd $SPWD
else
echo "Usage: getpatch DIRECTORY"
fi
}
getpatch will grab the patch bundle identifed by the $RB variable, and place it in the directory passed as an argument:
$ getpatch /tmp
Grabbing the latest recommended bundle ...
--21:58:11-- ftp://sunsolve.sun.com/patchroot/clusters/10_Recommended.zip
=> `10_Recommended.zip'
Resolving sunsolve.sun.com... 192.18.108.40
Connecting to sunsolve.sun.com[192.18.108.40]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /patchroot/clusters ... done.
==> PASV ... done. ==> RETR 10_Recommended.zip ... done.
Length: 88,546,001 (unauthoritative)
100%[======================================================================================>] 88,546,001 289.44K/s ETA 00:00
22:03:16 (284.60 KB/s) - `10_Recommended.zip' saved [88546001]
This should work for any bourne shell derivative.