Bug 108066 - /sbin/kernelversion can be simplified
Summary: /sbin/kernelversion can be simplified
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: modutils
Version: 9
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-27 12:18 UTC by Manoj Kumar
Modified: 2014-03-17 02:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-27 17:46:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Manoj Kumar 2003-10-27 12:18:38 UTC
Description of problem:
Replacement for /sbin/kernelversion, which is unnecessarily
complicated.

Version-Release number of selected component (if applicable):
modutils-2.4.22-8

Replacement follows.

#!/bin/sh
# kernelversion -- print kernel major.minor version numbers (e.g., 2.4)

version=$(uname -r)
major=${version%%.*}
version=${version#*.}
minor=${version%%.*}
echo "$major.$minor"

Comment 1 Bill Nottingham 2003-10-27 17:46:44 UTC
Please send this to the upstream maintainer, kaos.au. I doubt we'd
change this just for our version.


Note You need to log in before you can comment on or make changes to this bug.