2009-12-11 11:28:56 +01:00
|
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
|
2007-02-22 23:46:50 +01:00
|
|
|
run_hook ()
|
|
|
|
{
|
2009-12-11 11:28:56 +01:00
|
|
|
msg ":: Running hwdetect..."
|
2007-02-22 23:46:50 +01:00
|
|
|
HWDETECT="/sbin/hwdetect --load-modules"
|
|
|
|
if grep -qw ide-legacy /proc/cmdline; then
|
|
|
|
HWDETECT="$HWDETECT --ide-legacy"
|
|
|
|
else
|
|
|
|
# generating blacklist modules which are not covered by new pata subsystem!
|
2009-01-01 13:43:02 +01:00
|
|
|
#for i in /lib/modules/$(uname -r)/kernel/drivers/ide/*; do
|
2007-02-22 23:46:50 +01:00
|
|
|
# for alias in $(/sbin/modinfo $i|grep ^alias\:|cut -d' ' -f11); do
|
|
|
|
# [ -z "$(modprobe --show-depends $alias|grep '/ata/'|grep -v 'libata.ko')" ] && echo "$(basename ${i})" | sed -e 's/.ko//g' >> /tmp/.ide-blacklist
|
|
|
|
# done
|
2009-01-01 13:43:02 +01:00
|
|
|
for i in $(echo /lib/modules/$(uname -r)/kernel/drivers/ide/*); do
|
2010-01-26 19:46:16 +01:00
|
|
|
echo "blacklist $(basename $i .ko | grep -v ^ide) >> /etc/modprobe.d/ide-blacklist.conf
|
2007-02-22 23:46:50 +01:00
|
|
|
done
|
2009-12-11 10:28:39 +01:00
|
|
|
msg "Blacklisted IDE modules (old subsystem) for udev:"
|
|
|
|
msg "--------------------------------------"
|
2010-01-26 19:46:16 +01:00
|
|
|
if [ -s /etc/modprobe.d/ide-blacklist.conf ]; then
|
|
|
|
for i in $(sort -u /etc/modprobe.d/ide-blacklist.conf); do
|
|
|
|
echo -n "$i " | sed 's/blacklist//g'
|
2007-02-22 23:46:50 +01:00
|
|
|
done
|
2009-12-11 10:28:39 +01:00
|
|
|
msg ""
|
|
|
|
msg "If you need them, please use 'ide-legacy' boot option or load them by hand!"
|
2007-02-22 23:46:50 +01:00
|
|
|
else
|
2009-12-11 10:28:39 +01:00
|
|
|
msg "No modules blacklisted."
|
2007-02-22 23:46:50 +01:00
|
|
|
fi
|
2009-12-11 10:28:39 +01:00
|
|
|
msg "--------------------------------------"
|
2007-02-22 23:46:50 +01:00
|
|
|
|
|
|
|
fi
|
|
|
|
if /usr/bin/vmware-detect; then
|
|
|
|
HWDETECT="$HWDETECT --vmware"
|
|
|
|
fi
|
2009-12-11 11:28:56 +01:00
|
|
|
msg ":: Loading detected kernel modules..."
|
|
|
|
$HWDETECT
|
2007-02-22 23:46:50 +01:00
|
|
|
msg "done."
|
|
|
|
}
|