Bug 108066 - /sbin/kernelversion can be simplified
/sbin/kernelversion can be simplified
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: modutils (Show other bugs)
9
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brian Brock
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-27 07:18 EST by Manoj Kumar
Modified: 2014-03-16 22:39 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-27 12:46:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Manoj Kumar 2003-10-27 07:18:38 EST
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 12:46:44 EST
Please send this to the upstream maintainer, kaos@ocs.com.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.