--- module-init-tools-3.11.1.ebuild 2010-01-08 05:40:59.000000000 +0300 +++ module-init-tools-3.11.1.ebuild 2010-01-29 14:26:05.000000000 +0300 @@ -55,4 +55,22 @@ if grep -qs modules-update "${ROOT}"/etc/init.d/modules ; then sed -i 's:modules-update:update-modules:' "${ROOT}"/etc/init.d/modules fi + + if $(pushd "${ROOT}/etc/modprobe.d/" >/dev/null); then + local i f cfg + for f in *; do + [[ -z ${f/*.conf} ]] && continue # skip files _not_ ending on .conf + [[ ! -f ${f}.conf ]] && continue # skip if ${f}.conf doesn't exit + i=0 + cfg=$(printf "._cfg%04d_${f}.conf" ${i}) + while [[ -e ${cfg} ]];do + ((i++)) + cfg=$(printf "._cfg%04d_${f}.conf" ${i}) + done + einfo "Updating ${f} at ${ROOT}/etc/modprobe.d/" + mv "${f}.conf" "${cfg}" + mv "${f}" "${f}.conf" + done + popd >/dev/null + fi }