From e294cce512dd2a2a8478a2678beeeefe8f57da6d Mon Sep 17 00:00:00 2001 From: proski Date: Wed, 1 Jun 2011 16:00:18 +0000 Subject: [PATCH] Add support for Linux 3.x and newer git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4143 0192ed92-7a03-0410-a25b-9323aeb14dbd --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c050327..bf21ea7 100644 --- a/Makefile +++ b/Makefile @@ -170,13 +170,15 @@ unload: configcheck: sanitycheck @echo -n "Checking kernel configuration... " - @# check version of kernel - @echo $(KERNELRELEASE) | grep -q -i '^[2-9]\.[4-9]\.' || { \ - echo "FAILED"; \ - echo "Only kernel versions 2.4.x and above are supported."; \ - echo "You have $(KERNELRELEASE)."; \ - exit 1; \ - } + @# check kernel version + @case $(KERNELRELEASE) in \ + 2.[456].*) ;; \ + [3-9].*) ;; \ + *) echo "FAILED"; \ + echo "Only kernel versions 2.4.x and above are supported."; \ + echo "You have $(KERNELRELEASE)."; \ + exit 1 ;; \ + esac @# check kernel configuration @if [ -z "$(CONFIG_SYSCTL)" ]; then \