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 ()
|
|
|
|
{
|
2011-08-03 22:21:48 +02:00
|
|
|
msg ":: Echo generate IDE/PATA blacklist..."
|
2007-02-22 23:46:50 +01:00
|
|
|
if grep -qw ide-legacy /proc/cmdline; then
|
2011-08-03 22:21:48 +02:00
|
|
|
for i in $(echo /lib/modules/$(uname -r)/kernel/drivers/ata/*); do
|
2011-08-08 13:50:16 +02:00
|
|
|
echo "blacklist $(basename $i .ko.gz | grep -e '^pata' -e '^ata_generic' -e '^ata_piix')" >> /etc/modprobe.d/ide-blacklist.conf
|
2011-08-03 22:21:48 +02:00
|
|
|
done
|
|
|
|
msg "Blacklisted IDE modules (new subsystem) for udev:"
|
|
|
|
msg "--------------------------------------"
|
|
|
|
if [ -s /etc/modprobe.d/ide-blacklist.conf ]; then
|
|
|
|
for i in $(sort -u /etc/modprobe.d/ide-blacklist.conf | sed -e 's/blacklist //g'); do
|
|
|
|
echo -n "$i "
|
|
|
|
done
|
|
|
|
msg ""
|
|
|
|
msg "If you need them, please don't use 'ide-legacy' boot option or load them by hand!"
|
|
|
|
else
|
|
|
|
msg "No modules blacklisted."
|
|
|
|
fi
|
|
|
|
msg "--------------------------------------"
|
2007-02-22 23:46:50 +01:00
|
|
|
else
|
2009-01-01 13:43:02 +01:00
|
|
|
for i in $(echo /lib/modules/$(uname -r)/kernel/drivers/ide/*); do
|
2011-08-08 09:04:00 +02:00
|
|
|
echo "blacklist $(basename $i .ko.gz | 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
|
2010-02-08 15:42:32 +01:00
|
|
|
for i in $(sort -u /etc/modprobe.d/ide-blacklist.conf | sed -e 's/blacklist //g'); do
|
|
|
|
echo -n "$i "
|
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
|
|
|
|
}
|