summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-04-08 05:40:07 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-04-08 05:40:07 +0200
commitce757c64d793ab2fc72f3cf68b3fa3e2f40ca25c (patch)
treecd740248ee99e21446ee72fd851fccccfc9caa09
parent7b404564707f9ad35ebbf377f83e46f590f6b7ca (diff)
downloadmkinitcpio-ce757c64d793ab2fc72f3cf68b3fa3e2f40ca25c.tar.gz
mkinitcpio-ce757c64d793ab2fc72f3cf68b3fa3e2f40ca25c.tar.xz
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 <aaronmgriffin@gmail.com>
-rw-r--r--functions2
1 files changed, 1 insertions, 1 deletions
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")"