From 64aff3644e9c0b8813cce377c9850dd7906e8056 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 5 Jun 2011 13:56:41 -0400 Subject: functions: refactor add_module Simplify and fix a few bugs in the process. We rely solely on modinfo for obtaining information about module location, dependencies and firmware. Add a small wrapper function for modinfo that will always specify our $BASEDIR and $KERNELVERSION for us. Also, kill off HAS_MODULES. Since we have ADDED_MODULES, which contains all currently added modules, we can count the elements in this when it comes time to decide to create depmod files. Signed-off-by: Dave Reisner --- mkinitcpio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkinitcpio') diff --git a/mkinitcpio b/mkinitcpio index 201c4ce..7c42e9f 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -277,7 +277,7 @@ for hook in ${HOOKS}; do fi done -if [ "${HAS_MODULES}" = "y" ]; then +if (( ${#ADDED_MODULES[*]} )); then echo ":: Generating module dependencies" for mod in $(grep "file /lib/modules/${KERNELVERSION}" ${FILELIST} | cut -d' ' -f2); do install -m 644 -D "${BASEDIR}${mod}" "${TMPDIR}${mod}" -- cgit v1.2.3-24-g4f1b