]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
add 96insmodpost dracut module
authorHarald Hoyer <harald@redhat.com>
Mon, 18 Oct 2010 14:07:58 +0000 (16:07 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 18 Oct 2010 14:07:58 +0000 (16:07 +0200)
due to popular demand, this module loads a custom kernel module, after the
first udev settle (all basic device drivers loaded)

modules.d/96insmodpost/check [new file with mode: 0755]
modules.d/96insmodpost/insmodpost.sh [new file with mode: 0755]
modules.d/96insmodpost/install [new file with mode: 0755]
modules.d/96insmodpost/parse-insmodpost.sh [new file with mode: 0755]

diff --git a/modules.d/96insmodpost/check b/modules.d/96insmodpost/check
new file mode 100755 (executable)
index 0000000..e0292c8
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+exit 0
diff --git a/modules.d/96insmodpost/insmodpost.sh b/modules.d/96insmodpost/insmodpost.sh
new file mode 100755 (executable)
index 0000000..f3bd780
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+. /lib/dracut-lib.sh
+
+for p in $(getargs rdinsmodpost=); do 
+    modprobe $p
+done
diff --git a/modules.d/96insmodpost/install b/modules.d/96insmodpost/install
new file mode 100755 (executable)
index 0000000..4509d1b
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+inst_hook cmdline 20 "$moddir/parse-insmodpost.sh"
+inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
diff --git a/modules.d/96insmodpost/parse-insmodpost.sh b/modules.d/96insmodpost/parse-insmodpost.sh
new file mode 100755 (executable)
index 0000000..4cfd355
--- /dev/null
@@ -0,0 +1,11 @@
+#!/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 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