Simple script to grab and install the appropriate kernel RPMs

William Cohen wcohen@redhat.com
Tue Nov 4 15:49:00 GMT 2008


K.Prasad wrote:
> On Mon, Nov 03, 2008 at 02:13:48PM -0500, William Cohen wrote:
>> Hi All,
>>
>> In an effort to make it a bit easier to install systemtap on RHEL 
>> machines, I have made a small script to figure out which RPMs to install 
>> based either on the running kernel (no arguments to script) or the output 
>> of "uname -r" as an argument to the script. This script is only designed 
>> to work on RHEL. I would like to comments on it. The plan is to include 
>> this in the Systemtap beginners guide to make it easier for people to 
>> machine setup to run systemtap.
>>
> 
> Just thinking if the script mitigates the problem seen with PAE and smp
> versions of the kernel, wherein uname -r would contain the string PAE
> and smp, and the kernel package's name isn't a simple 'kernel-debuginfo'
> but a 'kernel-PAE-debuginfo'.
> 
> Thanks,
> K.Prasad
> 

Hi Prasad,

The is a for loop that checks for "debug kdump PAE xen" variants in the script 
and adjusts the name accordingly. It should catch the cases you are talking 
about. Let me know if it doesn't.

I have also updated the script so it only prints out the needed packages when 
run by a normal user (normal user can't do rpm install so why even try?). When 
run by root it will attempt to download the packages and install them.

I have attached the revised version of the script to this email. The script is 
also checked into the git repository in the documentation section:

  doc/SystemTap_Beginners_Guide/en-US /extras/stapprep.sh

-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stapprep.sh
Type: application/x-sh
Size: 1279 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20081104/8b8a658e/attachment.sh>


More information about the Systemtap mailing list