On Tue, 2002-07-16 at 17:02, Lew Newby wrote:
> I am trying to write a script that will compare the running kernel version
> against a range and if the value is within the range then the test passes
> else it fails. For example. Running kernel-2.4.18-3 and the range is
> 2.4.9-34 to 2.4.18-5. My problem is if I check the rpms, the kernel rpms
> have no SERIAL value or EPOCH value set in them. Trying to check against
> straight values is driving me nuts.
>
> Does anyone have any ideas or code fragments in bash to help out?
>
rpm -q --qf "%{name} %{epoch} %{version} %{release}\n" kernel
that should list that information for you.
-sv
Attachment:
signature.asc
Description: This is a digitally signed message part