/[gentoo-x86]/eclass/linux-mod.eclass
Gentoo

Diff of /eclass/linux-mod.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.29 Revision 1.30
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.29 2005/02/06 20:36:42 genstef Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.30 2005/03/08 21:41:31 johnm Exp $
4 4
5# Description: This eclass is used to interface with linux-info in such a way 5# Description: This eclass is used to interface with linux-info in such a way
6# to provide the functionality required and initial functions 6# to provide the functionality required and initial functions
7# required to install external modules against a kernel source 7# required to install external modules against a kernel source
8# tree. 8# tree.
132 ewarn 132 ewarn
133 fi 133 fi
134} 134}
135 135
136update_modules() { 136update_modules() {
137 if [ -x /sbin/modules-update ] && \ 137 if [ -x /sbin/modules-update -a \
138 grep -v -e "^#" -e "^$" ${D}/etc/modules.d/* >/dev/null 2>&1; then 138 -n "$(grep -v -e "^#" -e "^$" ${D}/etc/modules.d/*)" ] ; then
139 ebegin "Updating modules.conf" 139 ebegin "Updating modules.conf"
140 /sbin/modules-update 140 /sbin/modules-update
141 eend $? 141 eend $?
142 fi 142 fi
143} 143}
167 currm=${currm_path//*\/} 167 currm=${currm_path//*\/}
168 currm=$(echo ${currm} | tr '[:lower:]' '[:upper:]') 168 currm=$(echo ${currm} | tr '[:lower:]' '[:upper:]')
169 169
170 module_docs="$(eval echo \${MODULESD_${currm}_DOCS})" 170 module_docs="$(eval echo \${MODULESD_${currm}_DOCS})"
171 module_enabled="$(eval echo \${MODULESD_${currm}_ENABLED})" 171 module_enabled="$(eval echo \${MODULESD_${currm}_ENABLED})"
172 module_aliases="$(eval echo \${#MODULESD_${currm}_ALIASES[*]})" 172 module_aliases="$(eval echo \${#MODULESD_${currm/-/_}_ALIASES[*]})"
173 module_additions="$(eval echo \${#MODULESD_${currm}_ADDITIONS[*]})" 173 module_additions="$(eval echo \${#MODULESD_${currm/-/_}_ADDITIONS[*]})"
174 module_examples="$(eval echo \${#MODULESD_${currm}_EXAMPLES[*]})" 174 module_examples="$(eval echo \${#MODULESD_${currm/-/_}_EXAMPLES[*]})"
175 175
176 [[ ${module_aliases} -eq 0 ]] && unset module_aliases 176 [[ ${module_aliases} -eq 0 ]] && unset module_aliases
177 [[ ${module_additions} -eq 0 ]] && unset module_additions 177 [[ ${module_additions} -eq 0 ]] && unset module_additions
178 [[ ${module_examples} -eq 0 ]] && unset module_examples 178 [[ ${module_examples} -eq 0 ]] && unset module_examples
179 179

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20