Novell is now a part of Micro Focus

SLES9: Apply Security Patches without New Kernel Patches Being Applied

Novell Cool Solutions: Tip
By Cameron Seader

Digg This - Slashdot This

Updated: 2 Oct 2006


If you have a need in your environment to apply Security updates without having a new Kernel being applyed, then the following should help you accomplish this goal.


This script checks for available security updates and removes any kernel related update and applies the rest, and if there are no updates then it will append to /var/log/online_update.log stating that there are no updates available.


Updated Script - 02 Oct 2006

Copy the text below into a file preferably named


# This script will calculate all security updates available for any SLES9 system and will remove the kernel from the patches to apply.
# The script will then download and install the patches, due to the nature of the online_update commands used.
# If no patches are available it will kick out a log of it in /var/log/online_update.log
# Note: this is only for SECURITY Updates. 

TMPPatches=`mktemp -t patches.XXXXXXXXXX` || exit 1
touch /var/log/online_update.log

echo "Executing Online Update to calculate patches available..."

online_update -sd security | sed '/(Security)/ !d' | sed '/^ S / !d' | sed '/kernel/ d' | awk '{print $2}' | tr "\n" "," | sed '$s/.$//' >> $TMPPatches 
if [ "$update" != "" ]; then
echo "Executing Online Update to patch your system..."
online_update -S $update
echo "Security Updates Successfully Applied."
echo "`date` - Security Updates Successfully Applied." >> /var/log/online_update.log
echo "No Security Updates Available."
echo "`date` -  No Security Updates Available." >> /var/log/online_update.log

rm $TMPPatches


Once you have this shell script created you can save it in /usr/bin or something with the chmod 755 permissions on it. Now you are ready to set it up to run as a Cron Job at your desired date and time.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates