Re: how to detect a debian kernel from `uname -r`
On Sat, Sep 10, 2005 at 05:33:29PM +0200, Sven Luther wrote:
> Sure, i am not stupid, i perfectly noticed that, now my question is why do you
> want to know that ?
That's for the klive project, I added two links in the first email just
check it again.
> Sure, it is a debian system, running a debian kernel, and that's it. If you
> want you can look at the uname -r output, then look at /lib/modules/<version>
> and look in your dpkg database to match it to a package, something like that :
>
> dpkg -S /lib/modules/`uname -r`
>
> Or even :
>
> if dpkg -S /lib/modules/`uname -r` ; then echo DEBIAN; else echo NOT DEBIAN; fi
I don't want to call dpkg or rpm, I was hoping to get it from uname -r,
if I were to create an universal package management knowledge for all
distro out there, I wouldn't be asking to add the name in the uname -r.
> Sure, you have a debian system, you should have a debian kernel, if you don't
I disagree, you can run the mainline or other distro kernels as well,
what's wrong with that? Do you deviate from the mainline kernel API to
the point of requiring a debian kernel on a debian userland? I certainly
hope not.
> flavours, which are not compatible with each other) ? Also notice that
> /boot/config-`uname -r` will give you all the info you need about the running
> kernel's config file.
Unless you're running a kernel from an other distro that collides with
your uname -r which apparently can happen.
Anyway the way you answered, it sounds like it wasn't good idea about
asking here so just forget my email, I feel nothing is going to change
and that my little project or collisions in /boot/config-`uname -r`
won't be nearly enough arguments to add the branch name to the kernel
(like -mm/-ck/FC/etc..). So I'll stick with the regexp mess that can
identify quite some debian kernel already even if it's unreliable (cause
it's still simpler than dealing with dpkg/rpm or /etc in all different
distro flavours, which would require frequent client updates too).
Thanks.
Reply to: