aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2008-12-10 00:48:42 +0100
committerWilly Tarreau <w@1wt.eu>2008-12-10 00:48:42 +0100
commitc6e0a9792aaab34b3fca18fd7e34dab7e280128d (patch)
tree05621daeb3f55cc3531289cc0beeb748964796ce /scripts
parentpcidev: add support for matching multiple classes (diff)
downloadflxutils-c6e0a9792aaab34b3fca18fd7e34dab7e280128d.tar.xz
* pcidev: use modprobe $list and not modprobe on each element
modprobe knows how to load a module among a list, we must not call it on each element otherwise it causes errors for the second ones which fail.
Diffstat (limited to '')
-rwxr-xr-xscripts/pcidev11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/pcidev b/scripts/pcidev
index bec1701..82b4744 100755
--- a/scripts/pcidev
+++ b/scripts/pcidev
@@ -153,12 +153,11 @@ for device in $pcidev; do
if [ "$list" -a "$list" != "$oldlist" ]; then
oldlist="$list"
if [ $MODPROBE -gt 0 ]; then
- for module in $list; do
- if [ $VERBOSE -gt 0 ]; then
- echo "modprobe $module"
- fi
- modprobe $module
- done
+ # modprobe is smart enough to try several modules
+ if [ $VERBOSE -gt 0 ]; then
+ echo "modprobe $list"
+ fi
+ modprobe $list
else
echo $list
fi