move insmodpost and blacklisting to 90kernel-modules

also correctly parse rd.driver.{blacklist,pre,post}
master
Harald Hoyer 2011-03-10 12:54:28 +01:00
parent 4c4c8b7239
commit 5078c98abe
7 changed files with 19 additions and 44 deletions

View File

@ -1,9 +1,8 @@
#!/bin/sh #!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh # ex: ts=8 sw=4 sts=4 et filetype=sh
. /lib/dracut-lib.sh


for p in $(getargs rd.insmodpost rdinsmodpost=); do for p in $(getargs rd.driver.post rdinsmodpost=); do
( (
IFS=, IFS=,
for p in $i; do for p in $i; do

View File

@ -46,5 +46,6 @@ install() {
[ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
dracut_install $(find /etc/modprobe.d/ -type f -name '*.conf') dracut_install $(find /etc/modprobe.d/ -type f -name '*.conf')
inst_hook cmdline 01 "$moddir/parse-kernel.sh" inst_hook cmdline 01 "$moddir/parse-kernel.sh"
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
inst "$srcmods/modules.builtin.bin" "/lib/modules/$kernel/modules.builtin.bin" inst "$srcmods/modules.builtin.bin" "/lib/modules/$kernel/modules.builtin.bin"
} }

View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh # ex: ts=8 sw=4 sts=4 et filetype=sh


for p in $(getargs rd.loaddriver rdloaddriver=); do for p in $(getargs rd.driver.pre rdloaddriver=); do
( (
IFS=, IFS=,
for p in $i; do for p in $i; do
@ -11,3 +11,19 @@ for p in $(getargs rd.loaddriver rdloaddriver=); do
) )
done done


for p in $(getargs rd.driver.blacklist rdblacklist=); do
(
IFS=,
for p in $i; do
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
done
)
done

for p in $(getargs rd.driver.post rdinsmodpost=); do
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
_do_insmodpost=1
done

[ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh
unset _do_insmodpost

View File

@ -1,17 +0,0 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

check() {
return 0
}

depends() {
return 0
}

install() {
inst_hook cmdline 20 "$moddir/parse-insmodpost.sh"
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
}

View File

@ -1,11 +0,0 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

for p in $(getargs rd.insmodpost rdinsmodpost=); do
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
_do_insmodpost=1
done

[ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh
unset _do_insmodpost

View File

@ -38,7 +38,6 @@ install() {
fi fi
inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh" inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_hook cmdline 10 "$moddir/parse-root-opts.sh" inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
inst_hook cmdline 20 "$moddir/parse-blacklist.sh"
mkdir -p "${initdir}/var" mkdir -p "${initdir}/var"
[ -x /lib/systemd/systemd-timestamp ] && inst /lib/systemd/systemd-timestamp [ -x /lib/systemd/systemd-timestamp ] && inst /lib/systemd/systemd-timestamp
} }

View File

@ -1,12 +0,0 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

for p in $(getargs rd.module.blacklist rdblacklist=); do
(
IFS=,
for p in $i; do
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
done
)
done