From 530c2b024fd7e686210cf2f4e20a97ccc3421413 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 12 Sep 2005 20:54:47 +0000 Subject: fix usage of the blacklist (#168020) --- rc.d/rc.sysinit | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 29db361c..0883fb4b 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -146,8 +146,13 @@ eval `kmodule -d | while read devtype mod ; do esac done` +blacklist=$(modprobe -c | LC_ALL=C awk '/^[[:space:]]*blacklist/ { print $2 }') + load_module () { - LC_ALL=C fgrep -xq "$1" /etc/hotplug/blacklist 2>/dev/null || modprobe $1 >/dev/null 2>&1 + for module in $blacklist ; do + [ "$1" = "$module" ] && return + done + modprobe $1 >/dev/null 2>&1 } # IDE -- cgit v1.2.1