From 084a32afc403fdf5f260f888fb7d0ce6af23b30d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 9 Dec 2014 23:01:19 +0100 Subject: scripts/pcidev: fix issue introduced with last change This change missed the -em/-om feature so it's not possible anymore to exclude certain modules during boot! --- scripts/pcidev | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/pcidev b/scripts/pcidev index 1b2086d..0f3df99 100755 --- a/scripts/pcidev +++ b/scripts/pcidev @@ -177,7 +177,12 @@ for device in $pcidev; do # they tend to pop up everywhere there is a bridge. if [ ! -z "$MAPFILE" -a -s "${MAPFILE%.pcimap}.alias" ]; then alias=$(printf "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X" $xvid $xpid $xsvid $xspid $(((xclass >> 16) & 0xff)) $(((xclass >> 8) & 0xff)) $((xclass & 0xff))) - list=$(modprobe -R "$alias") + list="" + for f1 in $(modprobe -R "$alias"); do + [ -n "${EXCLMOD}" -a "${EXCLMOD[*]##*|$f1|*}" != "${EXCLMOD[*]}" ] && continue + [ -z "${ONLYMOD}" -o "${ONLYMOD[*]##*|$f1|*}" != "${ONLYMOD[*]}" ] || continue + list="$list$f1 " + done elif [ ! -z "$MAPFILE" ]; then list="" while read f1 f2 f3 f4 f5 f6 f7 rest; do -- 1.7.12.1