summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-10 01:43:44 +0100
committerDave Reisner <dreisner@archlinux.org>2012-11-11 00:47:33 +0100
commit2c801db8ed74dbea5e86fb0fbc77906c32ed1258 (patch)
tree57d4f463690be5f7c54a08316aaaf928b788869c /functions
parentf87734823e4815d7531c7c01cce772f07f3ef331 (diff)
downloadmkinitcpio-2c801db8ed74dbea5e86fb0fbc77906c32ed1258.tar.gz
mkinitcpio-2c801db8ed74dbea5e86fb0fbc77906c32ed1258.tar.xz
functions: avoid printing empty autodetect array
Fixes FS#32532. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions3
1 files changed, 1 insertions, 2 deletions
diff --git a/functions b/functions
index a10221f..8c44e43 100644
--- a/functions
+++ b/functions
@@ -227,8 +227,7 @@ auto_modules() {
xargs -d $'\n' modprobe -d "$MODULEROOT" -qaRS "$KERNELVERSION" |
sort -u)
- printf "%s\n" "${mods[@]//-/_}"
- (( ${#mods[*]} ))
+ (( ${#mods[*]} )) && printf "%s\n" "${mods[@]//-/_}"
}
all_modules() {