Skip to content

Commit

Permalink
autodetect: use xargs/modprobe properly to pass all args
Browse files Browse the repository at this point in the history
trims off a small amount of execution time, woo.
  • Loading branch information
falconindy committed May 22, 2011
1 parent 52dcddc commit 4280e0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builders/autodetect
Expand Up @@ -7,8 +7,8 @@ build() {
fi

# generate a list of modules from aliases in /sys/devices
find /sys/devices/ -name modalias -exec sort -u {} + |\
xargs -I {} modprobe -d "${basedir:-/}" --set-version "$kernver" --resolve-alias {} |\
find /sys/devices -name modalias -exec sort -u {} + |\
xargs modprobe -d "${basedir:-/}" --set-version "$kernver" -aR |\
sort -u >>"$autodetect_cache"

if (( UID == 0 )) || [[ $(groups) == *disk* ]]; then
Expand Down

0 comments on commit 4280e0f

Please sign in to comment.