From 2c801db8ed74dbea5e86fb0fbc77906c32ed1258 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 9 Nov 2012 19:43:44 -0500 Subject: functions: avoid printing empty autodetect array Fixes FS#32532. Signed-off-by: Dave Reisner --- functions | 3 +-- 1 file changed, 1 insertion(+), 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() { -- cgit v1.2.3-24-g4f1b