Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 165134 | Differences between
and this patch

Collapse All | Expand All

(-)/sbin/modules-update.orig (-8 / +12 lines)
Lines 399-418 Link Here
399
	if [[ ${CFG_NEW_FILE} -nt ${depfile} ]] ; then
399
	if [[ ${CFG_NEW_FILE} -nt ${depfile} ]] ; then
400
		arch=$(uname -m)
400
		arch=$(uname -m)
401
		ebegin "Updating modules.dep"
401
		ebegin "Updating modules.dep"
402
		for cfg in /lib/modules/${KV}/build /usr/src/linux-${KV} \
402
		depmod_args="-a"
403
		for dir in /lib/modules/${KV}/build /usr/src/linux-${KV} \
403
		           /boot /usr/src/linux ""
404
		           /boot /usr/src/linux ""
404
		do
405
		do
405
			cfg="${cfg}/System.map"
406
			map="${dir}/System.map"
406
			for suffix in -genkernel-{${arch},'*'}-${KV} -${KV} "" ; do
407
			for suffix in -genkernel-{${arch},'*'}-${KV} -${KV} "" ; do
407
				scfg=$(echo ${cfg}${suffix})
408
				smap=$(echo ${map}${suffix})
408
				scfg=${scfg%% *}
409
				smap=${smap%% *}
409
				[[ -f ${scfg} ]] && cfg=${scfg} && break 2
410
				# Use suffixed System.map if existant
411
				[[ -e ${smap} ]] && depmod_args="${depmod_args} -F ${smap}" && break 2
410
			done
412
			done
413
			# Use non-suffixed System.map if existant
414
			[[ -e ${map} ]] && depmod_args="${depmod_args} -F ${map}" && break
411
		done
415
		done
412
		[[ -n ${cfg} ]] && cfg="-F ${cfg}"
416
		depmod_args="${depmod_args} ${KV}"
413
		depmod -a ${cfg} ${KV}
417
		depmod ${depmod_args}
414
		eend $?
418
		eend $?
415
		[[ ${VERBOSE} -gt 0 ]] && einfo "Ran: depmod -a ${cfg} ${KV}"
419
		[[ ${VERBOSE} -gt 0 ]] && einfo "Ran: depmod ${depmod_args}"
416
	fi
420
	fi
417
else
421
else
418
	vewarn "The dir '${depfile}' does not exist, skipping call to depmod"
422
	vewarn "The dir '${depfile}' does not exist, skipping call to depmod"

Return to bug 165134