--- /tmp/linux-mod.eclass.orig 2013-03-22 10:14:42.281368081 +0200 +++ gentoo-x86/eclass/linux-mod.eclass 2013-03-22 10:14:46.353367755 +0200 @@ -77,12 +77,12 @@ # insinto /lib/modules/${KV_FULL}/usb # doins module_usb.${KV_OBJ} -# There is also support for automated modprobe.d/modules.d(2.4) file generation. +# There is also support for automated modprobe.d file generation. # This can be explicitly enabled by setting any of the following variables. # @ECLASS-VARIABLE: MODULESD__ENABLED # @DESCRIPTION: -# This is used to disable the modprobe.d/modules.d file generation otherwise the file will be +# This is used to disable the modprobe.d file generation otherwise the file will be # always generated (unless no MODULESD__* variable is provided). Set to "no" to disable # the generation of the file and the installation of the documentation. @@ -91,7 +91,7 @@ # This is a bash array containing a list of examples which should # be used. If you want us to try and take a guess set this to "guess". # -# For each array_component it's added an options line in the modprobe.d/modules.d file +# For each array_component it's added an options line in the modprobe.d file # # options array_component # @@ -101,7 +101,7 @@ # @DESCRIPTION: # This is a bash array containing a list of associated aliases. # -# For each array_component it's added an alias line in the modprobe.d/modules.d file +# For each array_component it's added an alias line in the modprobe.d file # # alias array_component # @@ -235,27 +235,6 @@ # internal function # -# FUNCTION: update_modules -# DESCRIPTION: -# It calls the update-modules utility. -update_modules() { - debug-print-function ${FUNCNAME} $* - - if [ -x /sbin/update-modules ] && \ - grep -v -e "^#" -e "^$" "${D}"/etc/modules.d/* >/dev/null 2>&1; then - ebegin "Updating modules.conf" - /sbin/update-modules - eend $? - elif [ -x /sbin/update-modules ] && \ - grep -v -e "^#" -e "^$" "${D}"/etc/modules.d/* >/dev/null 2>&1; then - ebegin "Updating modules.conf" - /sbin/update-modules - eend $? - fi -} - -# internal function -# # FUNCTION: move_old_moduledb # DESCRIPTION: # It updates the location of the database used by the module-rebuild utility. @@ -355,9 +334,9 @@ # # FUNCTION: # USAGE: /path/to/the/modulename_without_extension -# RETURN: A file in /etc/modules.d/ (kernel < 2.6) or /etc/modprobe.d/ (kernel >= 2.6) +# RETURN: A file in /etc/modprobe.d # DESCRIPTION: -# This function will generate and install the neccessary modprobe.d/modules.d file from the +# This function will generate and install the neccessary modprobe.d file from the # information contained in the modules exported parms. # (see the variables MODULESD__ENABLED, MODULESD__EXAMPLES, # MODULESD__ALIASES, MODULESD__ADDITION and MODULESD__DOCS). @@ -402,13 +381,13 @@ [[ -z ${!module_*} ]] && return 0 # OK so now if we have got this far, then we know we want to continue - # and generate the modules.d file. + # and generate the modprobe.d file. module_modinfo="$(modinfo -p ${currm_path}.${KV_OBJ})" module_config="${T}/modulesd-${currm}" - ebegin "Preparing file for modules.d" + ebegin "Preparing file for modprobe.d" #----------------------------------------------------------------------- - echo "# modules.d configuration file for ${currm}" >> "${module_config}" + echo "# modprobe.d configuration file for ${currm}" >> "${module_config}" #----------------------------------------------------------------------- [[ -n ${module_docs} ]] && \ echo "# For more information please read:" >> "${module_config}" @@ -494,11 +473,7 @@ #----------------------------------------------------------------------- # then we install it - if kernel_is ge 2 6; then - insinto /etc/modprobe.d - else - insinto /etc/modules.d - fi + insinto /etc/modprobe.d newins "${module_config}" "${currm_path//*\/}.conf" # and install any documentation we might have. @@ -687,7 +662,7 @@ # It install the modules specified in MODULES_NAME. The modules should be inside the ${objdir} # directory and they are installed inside /lib/modules/${KV_FULL}/${libdir}. # -# The modprobe.d/modules.d configuration file is automatically generated if the +# The modprobe.d configuration file is automatically generated if the # MODULESD__* variables are defined. The only way to stop this process is by # setting MODULESD__ENABLED=no. At the end the documentation specified via # MODULESD__DOCS is also installed. @@ -727,27 +702,24 @@ debug-print-function ${FUNCNAME} $* [ -d "${D}lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false - [ -d "${D}etc/modules.d" ] && UPDATE_MODULES=true || UPDATE_MODULES=false [ -d "${D}lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false } # @FUNCTION: linux-mod_pkg_postinst # @DESCRIPTION: # It executes /sbin/depmod and adds the package to the /var/lib/module-rebuild/moduledb -# database (if ${D}/lib/modules is created) and it runs /sbin/update-modules -# (if ${D}/etc/modules.d is created). +# database (if ${D}/lib/modules is created)" linux-mod_pkg_postinst() { debug-print-function ${FUNCNAME} $* ${UPDATE_DEPMOD} && update_depmod; - ${UPDATE_MODULES} && update_modules; ${UPDATE_MODULEDB} && update_moduledb; } # @FUNCTION: linux-mod_pkg_postrm # @DESCRIPTION: # It removes the package from the /var/lib/module-rebuild/moduledb database but it doens't -# call /sbin/depmod and /sbin/update-modules because the modules are still installed. +# call /sbin/depmod because the modules are still installed. linux-mod_pkg_postrm() { debug-print-function ${FUNCNAME} $* remove_moduledb;