procmail
[Top] [All Lists]

Id Linux Dist and Ver (was Re: store all headers ??)

2001-09-04 08:09:47
On  4 Sep, Timothy J. Luoma wrote:
[...]
| ps -- Linux Q: anyone know how to figure out (from the commandline)
| what version & dist. of Linux is being used?  'telnet localhost 80'
| usually helps, but there's no apache running on the machine in
| question.

AKAIK there's no single reliable method that'll work across all
distributions. Of course, you can get kernel version with 'uname -r',
but I'm pretty sure you mean vendor version, not kernel version. SuSE
puts distribution version info in /etc/SuSE-release and I kind of recall
something similar years ago on Caldera. I believe Redhat uses
/etc/redhat-release. I have no clues for any other vendors, but cat
/etc/*release might be a reasonable first step.

Here's a couple other ideas that *might* help. On rpm based systems,
"rpm -qi libc|awk -F: '{/[vV]endor:/ {print $NF}'" (or some other
package almost certain to be installed) will likely give you the
vendor, unless it's been updated from somewhere other than the vendor.
That seems less likely for a package like libc. Package naming
conventions vary between distributions, but something like libc might
work. Of course that's no help with debian, slackware, and others, and
still doesn't give you version info. Believing all the vendors are
predictably vain, /etc/issue or /etc/issue.net probably frequently offer
vendor and version information, but they can also be changed to tell a
lie or nothing at all. None of these are foolproof, but taken together
they might help.

-- 
                   /"\
Don Hammond        \ /     ASCII Ribbon Campaign
Raleigh, NC US      X        Against HTML Mail,
                   / \      and News Too

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>