AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.145.42.140


Current Path : /usr/share/initramfs-tools/hooks/
Upload File :
Current File : //usr/share/initramfs-tools/hooks/overlayroot

#!/bin/sh
set -e

PREREQS="cryptsetup"
case $1 in
	prereqs) echo "${PREREQS}"; exit 0;;
esac

. /usr/share/initramfs-tools/hook-functions

##
copy_exec /usr/bin/head /bin
copy_exec /usr/bin/sha512sum /bin
copy_exec /sbin/wipefs /sbin
copy_exec /sbin/cryptsetup /sbin
copy_exec /sbin/mke2fs /sbin

manual_add_modules overlayfs
manual_add_modules overlay
manual_add_modules dm_mod
manual_add_modules dm_crypt
# this is '||' only in case this module isn't built
manual_add_modules aesni_intel || true

# Grab as much true random data as possible, up to 4KB, and stash it into a
# random seed in the initramfs
dd if=/dev/random of="${DESTDIR}/.random-seed" bs=1 count=4096 iflag=nonblock >/dev/null 2>&1 || true

# vi: ts=4 noexpandtab