summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-08-28 03:24:15 +0000
committerMike Frysinger <vapier@gentoo.org>2004-08-28 03:24:15 +0000
commit8e4ffbffaf8c070cdc7f4b51fe22a179b813ebe6 (patch)
tree2d8791fe9943b75db310b47659a2bad2b4c09691 /eclass
parentmanifest recommit (Manifest recommit) (diff)
downloadgentoo-2-8e4ffbffaf8c070cdc7f4b51fe22a179b813ebe6.tar.gz
gentoo-2-8e4ffbffaf8c070cdc7f4b51fe22a179b813ebe6.tar.bz2
gentoo-2-8e4ffbffaf8c070cdc7f4b51fe22a179b813ebe6.zip
add a func for checking module support
Diffstat (limited to 'eclass')
-rw-r--r--eclass/check-kernel.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/check-kernel.eclass b/eclass/check-kernel.eclass
index 6250da4e119a..4842e68e99e7 100644
--- a/eclass/check-kernel.eclass
+++ b/eclass/check-kernel.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/check-kernel.eclass,v 1.3 2004/06/25 00:39:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/check-kernel.eclass,v 1.4 2004/08/28 03:24:15 vapier Exp $
# Author: Martin Schlemmer <azarah@gentoo.org>
# Eclass'd by: Seemant Kulleen <seemant@gentoo.org>
@@ -23,13 +23,15 @@ check_version_h() {
eerror "to your current kernel sources, and that you did run:"
eerror
eerror " # make dep"
+ eerror
+ eerror "(${ROOT}/usr/src/linux/include/linux/version.h does not exist)"
die "/usr/src/linux symlink not setup!"
fi
}
get_KV_info() {
check_version_h
-
+
# Get the kernel version of sources in /usr/src/linux ...
export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \
"${ROOT}/usr/src/linux/include/linux/version.h")"
@@ -70,3 +72,7 @@ is_2_6_kernel() {
return 1
fi
}
+
+kernel_supports_modules() {
+ grep '^CONFIG_MODULES=y$' ${ROOT}/usr/src/linux/include/linux/autoconf.h >& /dev/null
+}