summaryrefslogtreecommitdiffstats
path: root/package/madwifi/patches/476-3.0_detection_fix.patch
blob: 2f8bfb4a55cca99ddb73ba2f332fc5ebb2ac4340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/Makefile
+++ b/Makefile
@@ -155,13 +155,15 @@ unload:
 configcheck:
 	@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 \