summaryrefslogtreecommitdiff
path: root/sys-boot/myinitramfs/files/gen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot/myinitramfs/files/gen.sh')
-rwxr-xr-xsys-boot/myinitramfs/files/gen.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/sys-boot/myinitramfs/files/gen.sh b/sys-boot/myinitramfs/files/gen.sh
index 958b974..136f7ff 100755
--- a/sys-boot/myinitramfs/files/gen.sh
+++ b/sys-boot/myinitramfs/files/gen.sh
@@ -8,19 +8,29 @@ cd "$(dirname "$(readlink -f "$0")")"
LIST="$(mktemp)"
+add_exec() {
+ P="$(which "$1")"
+ echo "# $EXE" >> "$LIST"
+ echo "file $P $P 755 0 0" >> "$LIST"
+ ldd "$P" | awk '{ print $3 }' | sed -n '/^[^ ]\+$/p' | while read -r LIB; do
+ echo "file $LIB $LIB 755 0 0" >> "$LIST"
+ done
+}
+
# Base list
cp baselist "$LIST"
# Init script
echo "file /init ./init.enc 755 0 0" >> "$LIST"
echo >> "$LIST"
+# Executables required when USE_DMI
+if [ -n "$USE_DMI" ]; then
+ echo "file /sbin/initramfs_password ./initramfs_password 755 0 0" >> "$LIST"
+ add_exec dmidecode
+ add_exec sha512sum
+fi
# Executables
while read -r EXE; do
- P="$(which "$EXE")"
- echo "# $EXE" >> "$LIST"
- echo "file $P $P 755 0 0" >> "$LIST"
- ldd "$P" | awk '{ print $3 }' | sed -n '/^[^ ]\+$/p' | while read -r LIB; do
- echo "file $LIB $LIB 755 0 0" >> "$LIST"
- done
+ add_exec "$EXE"
done <exelist
# Buld initramfs