Fix rd.blacklist.driver when no /etc/modprobe.d exists
This bug was reported as http://bugzilla.redhat.com/873220#c2 As the /etc/modprobe.d isn't created in the boot process nor bundled within the initramfs, the initramfsblacklist.conf cannot be created. Instead, the /usr/lib/modprobe.d directory is available and using it will restore the blacklist behavior.master
parent
488d55c546
commit
00ae54f00a
|
|
@ -2,6 +2,15 @@
|
|||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
_modprobe_d=/etc/modprobe.d
|
||||
if [ -d /usr/lib/modprobe.d ] ; then
|
||||
_modprobe_d=/usr/lib/modprobe.d
|
||||
elif [ -d /lib/modprobe.d ] ; then
|
||||
_modprobe_d=/lib/modprobe.d
|
||||
elif [ ! -d $_modprobe_d ] ; then
|
||||
mkdir -p $_modprobe_d
|
||||
fi
|
||||
|
||||
for i in $(getargs rd.driver.pre -d rdloaddriver=); do
|
||||
(
|
||||
IFS=,
|
||||
|
|
@ -15,15 +24,15 @@ for i in $(getargs rd.driver.blacklist -d rdblacklist=); do
|
|||
(
|
||||
IFS=,
|
||||
for p in $i; do
|
||||
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
|
||||
echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf
|
||||
done
|
||||
)
|
||||
done
|
||||
|
||||
for p in $(getargs rd.driver.post -d rdinsmodpost=); do
|
||||
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
|
||||
echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf
|
||||
_do_insmodpost=1
|
||||
done
|
||||
|
||||
[ -n "$_do_insmodpost" ] && initqueue --settled --unique --onetime insmodpost.sh
|
||||
unset _do_insmodpost
|
||||
unset _do_insmodpost _modprobe_d
|
||||
|
|
|
|||
Loading…
Reference in New Issue