summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-05 19:56:41 +0200
committerDave Reisner <d@falconindy.com>2011-06-16 20:19:12 +0200
commit64aff3644e9c0b8813cce377c9850dd7906e8056 (patch)
tree6505c56a886b0a19f230bf83a43d4b4608033730 /mkinitcpio
parent32e3a80c2a8bd9c1278db3e33ea9b5963db0218a (diff)
downloadmkinitcpio-64aff3644e9c0b8813cce377c9850dd7906e8056.tar.gz
mkinitcpio-64aff3644e9c0b8813cce377c9850dd7906e8056.tar.xz
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 <d@falconindy.com>
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio2
1 files changed, 1 insertions, 1 deletions
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}"