diff options
author | Robert Buchholz <rbu@goodpoint.de> | 2009-08-05 14:46:33 +0200 |
---|---|---|
committer | Robert Buchholz <rbu@goodpoint.de> | 2009-08-05 14:46:33 +0200 |
commit | 261699aa312df90d4b89a8441fb03cbf4f1c1817 (patch) | |
tree | 3e13f1d0e71e4bed2ce2979436c7b6eb26b1182a | |
parent | Print error messages on unimplemented functionality (diff) | |
download | kernel-check-261699aa312df90d4b89a8441fb03cbf4f1c1817.tar.gz kernel-check-261699aa312df90d4b89a8441fb03cbf4f1c1817.tar.bz2 kernel-check-261699aa312df90d4b89a8441fb03cbf4f1c1817.zip |
Check for Linux kernel on startup
-rwxr-xr-x | kernel-check.py | 7 |
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' % |