summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2007-04-13 01:25:53 +0200
committermaximilian attems <maks@debian.org>2007-04-13 01:25:53 +0200
commit878b47192bc92fcfe78f34134a8aea70afc161f5 (patch)
tree77d0f89b0b71b9f2a078c3a6345fe5404dd5578e /scripts
parent976a23c3d0a4fb156f4e069ff2bbde7c3daa6927 (diff)
downloadinitramfs-tools-878b47192bc92fcfe78f34134a8aea70afc161f5.tar.gz
initramfs-tools-878b47192bc92fcfe78f34134a8aea70afc161f5.zip
Add support for a blacklist boot parameter.
disallows modules loading inside of the initramfs.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/init-premount/blacklist25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/init-premount/blacklist b/scripts/init-premount/blacklist
new file mode 100755
index 0000000..1dd9dbc
--- /dev/null
+++ b/scripts/init-premount/blacklist
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# sanity check
+[ -z "${blacklist}" ] && exit 0
+
+# write blacklist to modprobe.d
+IFS=','
+for b in ${blacklist}; do
+ echo "blacklist $b" >> /etc/modprobe.d/initramfs
+done