#!/bin/sh # name: checkpatch # # The checkpatch script checks for newly available patches for the system. # I recommend that it be run daily. # # The checkpatch script uses a free tool from the community, # the Patch Check Advanced (PCA) tool. # # Read associated tech tip at: # http://www.sun.com/bigadmin/content/submitted/system_autocheck.jsp # as well as tech tip at: # http://www.sun.com/bigadmin/content/submitted/net_sys_autocheck.jsp # # skip the patches you want to ignore IGNORE="$IGNORE --ignore 112925" IGNORE="$IGNORE --ignore 112960" # Sun Online Account info USERNAME= PASSWORD= # who should receive messages MAIL_RECEIVER= PATH=/usr/bin; export PATH # Check security patches PCA="/pca/pca -l missings --user $USERNAME --passwd $PASSWORD" PCA="$PCA $IGNORE" if $PCA | grep "^[1-9][1-9]" > /dev/null then echo "run $PCA" > /tmp/pcaoutput.txt mailx -s "New patch is available" $MAIL_RECEIVER < /tmp/pcaoutput.txt fi ############################################################################## ### This community-submitted script uses the Patch Check Advanced (PCA) ### tool from Martin Paul at: http://www.par.univie.ac.at/solaris/pca/ ############################################################################## ############################################################################## ### This script is submitted to BigAdmin by a user of the BigAdmin community. ### Sun Microsystems, Inc. is not responsible for the ### contents or the code enclosed. ### ### ### Copyright Sun Microsystems, Inc. ALL RIGHTS RESERVED ### Use of this software is authorized pursuant to the ### terms of the license found at ### http://www.sun.com/bigadmin/common/berkeley_license.jsp ##############################################################################