summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@goodpoint.de>2009-08-05 14:46:33 +0200
committerRobert Buchholz <rbu@goodpoint.de>2009-08-05 14:46:33 +0200
commit261699aa312df90d4b89a8441fb03cbf4f1c1817 (patch)
tree3e13f1d0e71e4bed2ce2979436c7b6eb26b1182a
parentPrint error messages on unimplemented functionality (diff)
downloadkernel-check-261699aa312df90d4b89a8441fb03cbf4f1c1817.tar.gz
kernel-check-261699aa312df90d4b89a8441fb03cbf4f1c1817.tar.bz2
kernel-check-261699aa312df90d4b89a8441fb03cbf4f1c1817.zip
Check for Linux kernel on startup
-rwxr-xr-xkernel-check.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel-check.py b/kernel-check.py
index dc1fe37..85734ee 100755
--- a/kernel-check.py
+++ b/kernel-check.py
@@ -43,7 +43,12 @@ def main(argv):
print '>>> Gathering system information'
- kernel = lib.extract_version(os.uname()[2])
+ uname = os.uname()
+ if uname[0] != 'Linux':
+ error('This program currently only works for Linux kernels. Apparantly you are using "%s".' % (uname[0],) )
+ sys.exit(1)
+
+ kernel = lib.extract_version(uname[2])
best = lib.best_version(kernel.source)
if kernel is not None:
info('Kernel version: %s' % (color('GOOD', '%s-%s' %