summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2005-07-05 11:37:03 +0000
committerJohn Mylchreest <johnm@gentoo.org>2005-07-05 11:37:03 +0000
commit5b7893120244c49f5d5125b06fbb6de3091f9e07 (patch)
tree782e363e06b3615fc6b8230403d38eb8d221d7d8 /eclass/linux-mod.eclass
parentFixes bugs #97765 & #97796 (diff)
downloadgentoo-2-5b7893120244c49f5d5125b06fbb6de3091f9e07.tar.gz
gentoo-2-5b7893120244c49f5d5125b06fbb6de3091f9e07.tar.bz2
gentoo-2-5b7893120244c49f5d5125b06fbb6de3091f9e07.zip
changing moduledb dir to correspond with FHS and closes bug #97796
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r--eclass/linux-mod.eclass20
1 files changed, 12 insertions, 8 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index d86ebc94343a..3cf587759aee 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.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/linux-mod.eclass,v 1.39 2005/06/30 08:58:55 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.40 2005/07/05 11:37:03 johnm Exp $
# Description: This eclass is used to interface with linux-info in such a way
# to provide the functionality required and initial functions
@@ -189,20 +189,24 @@ update_modules() {
}
update_moduledb() {
- if [[ ! -f ${ROOT}/usr/share/module-rebuild/moduledb ]]; then
- [[ ! -d ${ROOT}/usr/share/module-rebuild/ ]] && mkdir ${ROOT}/usr/share/module-rebuild/
- touch ${ROOT}/usr/share/module-rebuild/moduledb
+ local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/
+
+ if [[ ! -f ${MODULEDB_DIR}/moduledb ]]; then
+ [[ ! -d ${MODULEDB_DIR} ]] && mkdir -p ${MODULEDB_DIR}
+ touch ${MODULEDB_DIR}/moduledb
fi
- if [[ -z $(grep ${CATEGORY}/${PN}-${PVR} ${ROOT}/usr/share/module-rebuild/moduledb) ]]; then
+ if [[ -z $(grep ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb) ]]; then
einfo "Adding module to moduledb."
- echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${ROOT}/usr/share/module-rebuild/moduledb
+ echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${MODULEDB_DIR}/moduledb
fi
}
remove_moduledb() {
- if [[ -n $(grep ${CATEGORY}/${PN}-${PVR} ${ROOT}/usr/share/module-rebuild/moduledb) ]]; then
+ local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/
+
+ if [[ -n $(grep ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb) ]]; then
einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb."
- sed -ie "/.*${CATEGORY}\/${P}.*/d" ${ROOT}/usr/share/module-rebuild/moduledb
+ sed -ie "/.*${CATEGORY}\/${P}.*/d" ${MODULEDB_DIR}/moduledb
fi
}