From d9a4d1b6c501c2bc6c9a2bc57dc1d3fcfaddc1ff Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 26 Nov 2011 11:27:24 -0500 Subject: 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 --- mkinitcpio | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3-24-g4f1b