SUSE Conversations


SLE10: Apply Updates Without New Kernel Updates Being Applied

cseader

By: cseader

April 27, 2007 11:38 am

Reads:97

Comments:0

Rating:0

Application:

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

Explanation:

This script checks for available updates and removes any kernel related update and applies the rest, and if there are no updates then it will exit with “No Updates Available”.

Script:

Copy the text below into a file preferably named rug_up_minus_kernel.sh or download it here.

#!/bin/bash
#rug_up_minus_kernel.sh
#
# This script is intended to apply updates from rug without installing the kernel updates.
# 

RUGBIN=`which rug`

TMPPatches=`mktemp -t patches.XXXXXXXXXX` || exit 1

if [ -e $RUGBIN ]; then
$RUGBIN lu | sed -e '/--/ d' -e '/Name/ d' -e '/kernel/ d' | awk '{ OFS="-"; print $6,$8 }' | tr "\n" " " | sed -e '$s/-.$//' -e '1s/..//' >> $TMPPatches

update=`<$TMPPatches`
if [ "$update" != "" ]; then
echo "Executing rug to patch your system..."

# You can add a -y to supress the yes/no option given
# $RUGBIN in $update -y
$RUGBIN in $update 

else 
echo "No Updates Available."
fi
fi

rm $TMPPatches

Once you have this shell script created you can save it in /root/bin or something with the chmod 755 permissions on it. Now you are ready to set it up to run as a Cron Job or use it as you desire.

Enjoy!!

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Categories: Uncategorized

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

Comment

RSS