summaryrefslogtreecommitdiffstats
path: root/scripts/init-top
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:45:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:45:07 +0000
commit3b043b08c9b52424072db56be6636ff44c737e83 (patch)
treed64185acc33a046c8bb297641a16b01ec167eaa5 /scripts/init-top
parentInitial commit. (diff)
downloadinitramfs-tools-3b043b08c9b52424072db56be6636ff44c737e83.tar.xz
initramfs-tools-3b043b08c9b52424072db56be6636ff44c737e83.zip
Adding upstream version 0.142.upstream/0.142upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/init-top')
-rwxr-xr-xscripts/init-top/all_generic_ide28
-rwxr-xr-xscripts/init-top/blacklist25
-rwxr-xr-xscripts/init-top/keymap18
3 files changed, 71 insertions, 0 deletions
diff --git a/scripts/init-top/all_generic_ide b/scripts/init-top/all_generic_ide
new file mode 100755
index 0000000..cdf69cc
--- /dev/null
+++ b/scripts/init-top/all_generic_ide
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+PREREQ=""
+prereqs()
+{
+ echo "$PREREQ"
+}
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# shellcheck disable=SC2013
+for x in $(cat /proc/cmdline); do
+ case ${x} in
+ all_generic_ide)
+ /sbin/modprobe ata_generic all_generic_ide=1
+ ;;
+ all_generic_ide=*)
+ if [ -n "${x#all_generic_ide=}" ]; then
+ /sbin/modprobe ata_generic all_generic_ide=1
+ fi
+ ;;
+ esac
+done
diff --git a/scripts/init-top/blacklist b/scripts/init-top/blacklist
new file mode 100755
index 0000000..d860603
--- /dev/null
+++ b/scripts/init-top/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.conf
+done
diff --git a/scripts/init-top/keymap b/scripts/init-top/keymap
new file mode 100755
index 0000000..1c6b2dc
--- /dev/null
+++ b/scripts/init-top/keymap
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+PREREQ=""
+prereqs()
+{
+ echo "$PREREQ"
+}
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+if [ -x /bin/setupcon ]; then
+ /bin/setupcon
+fi