summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-11-26 17:27:24 +0100
committerDave Reisner <dreisner@archlinux.org>2011-11-29 11:56:41 +0100
commitd9a4d1b6c501c2bc6c9a2bc57dc1d3fcfaddc1ff (patch)
tree5904ad63af1cd4bfe9344a06d5bbbef5e5894c7d
parent94a39ff727782b95af688508404c114840ec3c2c (diff)
downloadmkinitcpio-d9a4d1b6c501c2bc6c9a2bc57dc1d3fcfaddc1ff.tar.gz
mkinitcpio-d9a4d1b6c501c2bc6c9a2bc57dc1d3fcfaddc1ff.tar.xz
mkinitcpio: warn when no modules are added to the image
Maybe something went wrong with depmod after a kernel install, or the user grabbed a kernel directory for an old kernel. Either way, if you're using an initramfs, there's a very high probability that you'll have at least 1 module on it. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio2
1 files changed, 2 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index c20a1b6..5579bba 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -345,6 +345,8 @@ if (( ${#ADDED_MODULES[*]} )); then
msg "Generating module dependencies"
/sbin/depmod -b "$BUILDROOT" "${KERNELVERSION}"
rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(dep.bin|alias.bin|symbols.bin)
+else
+ warning "No modules were added to the image. This is probably not what you want."
fi
declare -i status=0