add rdblacklist command line parameter
authorHarald Hoyer <harald@redhat.com>
Fri, 19 Jun 2009 09:12:24 +0000 (11:12 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 19 Jun 2009 11:00:08 +0000 (13:00 +0200)
modules.d/99base/install
modules.d/99base/parse-blacklist.sh [new file with mode: 0755]

index 06cf6db..4bf5301 100755 (executable)
@@ -14,4 +14,5 @@ else
 fi
 inst "$moddir/dracut-lib" "/lib/dracut-lib"
 inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
+inst_hook cmdline 20 "$moddir/parse-blacklist.sh"
 inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh"
diff --git a/modules.d/99base/parse-blacklist.sh b/modules.d/99base/parse-blacklist.sh
new file mode 100755 (executable)
index 0000000..9c0a9e0
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if getarg rdblacklist= >/dev/null ; then
+    [ "$CMDLINE" ] || read CMDLINE < /proc/cmdline
+    for p in $CMDLINE; do
+        [ -n "${p%rdblacklist=*}" ] && continue
+
+        echo "blacklist ${p#rdblacklist=}" >> /etc/modprobe.d/initramfsblacklist.conf
+    done
+fi