Patchadd Dry Run

/patchadd-dry-run 2007-02-16T17:45:02+00:00

I discovered this little gem today. Patchadd on Solaris 10 and later has an undocumented and little known -a flag that allows you to perform a dry run to see if a patch would install.

Here's a little demo using the now vital in.telnetd patch:

[devon : /var/tmp/]# patchadd -a 120068-02
Validating patches...

Loading patches installed on the system...


Loading patches requested to install.


Checking patches that you specified for installation.

System patches
117461-08 118367-02 118371-06 118373-01 118812-01 118868-01 118872-02 118918-09

... [ Truncated for brevity ] ...

Dry run exit.

[devon : /var/tmp/]#

Looks just like the output you get when you normally apply patches, except for the long list of patches at the end. My only (minor) criticism of this is it doesn't do the filesystem space check. I didn't specify the -d option, so I'd expect the space check to be run.

Unfortunately, earlier releases don't have this, but there's nothing stopping you from adding this functionality by modifying the /usr/lib/patch/patchadd script. It won't be supported of course ;-) .

Copyright © 2005 - 2021 Colin Seymour All rights reserved. Privacy Policy.
Check out the feed if you do the RSS/Atom thing.