From ce757c64d793ab2fc72f3cf68b3fa3e2f40ca25c Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 7 Apr 2009 20:40:07 -0700 Subject: Improve modalias parsing line Replace find-exec syntax, using + instead of \; This is faster (executes cat for all files instead of once for each file found). IMPORTANT: This also has the added benefit of fixing a bash 4.0 bug where $(find ... -exec ... \;) fails hard. Ugh Signed-off-by: Aaron Griffin --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index 1ce535c..f6efc48 100644 --- a/functions +++ b/functions @@ -1,7 +1,7 @@ auto_modules () { - aliases=$(find /sys/devices/ -name modalias -exec cat {} \;) + aliases="$(find /sys/devices/ -name modalias -exec cat {} +)" mods="" for a in $aliases; do m="$(resolve-modalias "/lib/modules/${KERNELVERSION}/modules.alias" "$a")" -- cgit v1.2.3-24-g4f1b