#!/bin/sh set -e PREREQ="cryptroot" prereqs() { echo "$PREREQ" } case $1 in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions # Hooks for loading gnupg software and symmetrically encrypted key into # the initramfs # Check whether cryptroot hook has installed decrypt_gnupg script if [ ! -x ${DESTDIR}/lib/cryptsetup/scripts/decrypt_gnupg ] ; then exit 0 fi # Install cryptroot key files into initramfs grep -E '(.*,)?keyscript=([^,]*\/)?decrypt_gnupg(,.*)?$' "${DESTDIR}/conf/conf.d/cryptroot" | \ sed -r '/(.*,)?key=([^,]*)(,.*)?$/ s//\2/; t n; s/.*//; :n' | \ while read key; do if [ -z "$key" ]; then echo "$0: Missing key file in ${DESTDIR}/conf/conf.d/cryptroot" >&2 cat "${DESTDIR}/conf/conf.d/cryptroot" >&2 exit 1 fi echo "WARNING: gpg-encrypted key $key is copied to initramfs" >&2 mkdir -p "${DESTDIR}/$(dirname ${key})" cp -f "$key" "${DESTDIR}/${key}" done # Install gnupg software copy_exec /usr/bin/gpg exit 0
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
bcache | File | 543 B | 0755 |
|
btrfs | File | 597 B | 0755 |
|
cloud-initramfs-dyn-netconf | File | 118 B | 0755 |
|
compcache | File | 3.52 KB | 0755 |
|
console_setup | File | 3.07 KB | 0755 |
|
copymods | File | 280 B | 0755 |
|
cryptgnupg | File | 979 B | 0755 |
|
cryptkeyctl | File | 451 B | 0755 |
|
cryptopenct | File | 1.53 KB | 0755 |
|
cryptopensc | File | 1.81 KB | 0755 |
|
cryptpassdev | File | 913 B | 0755 |
|
cryptroot | File | 24.48 KB | 0755 |
|
cryptroot-unlock | File | 425 B | 0755 |
|
dmsetup | File | 506 B | 0755 |
|
fixrtc | File | 412 B | 0755 |
|
framebuffer | File | 528 B | 0755 |
|
fsck | File | 2.1 KB | 0755 |
|
fuse | File | 230 B | 0755 |
|
iscsi | File | 724 B | 0755 |
|
kbd | File | 301 B | 0755 |
|
klibc-utils | File | 843 B | 0755 |
|
kmod | File | 424 B | 0755 |
|
lvm2 | File | 670 B | 0755 |
|
mdadm | File | 2.83 KB | 0755 |
|
ntfs_3g | File | 304 B | 0755 |
|
overlayroot | File | 732 B | 0755 |
|
plymouth | File | 5.15 KB | 0755 |
|
resume | File | 2.21 KB | 0755 |
|
thermal | File | 1.25 KB | 0755 |
|
udev | File | 1.67 KB | 0755 |
|
zz-busybox-initramfs | File | 1.33 KB | 0755 |
|
zz-dhclient | File | 411 B | 0755 |
|