diff options
author | dacook <schism@subverted.org> | 2009-12-17 08:58:32 -0700 |
---|---|---|
committer | dacook <schism@subverted.org> | 2011-01-11 12:20:27 -0700 |
commit | 1d706752f1cfd47c624370a239b64f7143134647 (patch) | |
tree | 626076cae975e7453c5361f7a8d8a647deb97d17 /gen_initramfs.sh | |
parent | GPG compile (diff) | |
download | genkernel-1d706752f1cfd47c624370a239b64f7143134647.tar.gz genkernel-1d706752f1cfd47c624370a239b64f7143134647.tar.bz2 genkernel-1d706752f1cfd47c624370a239b64f7143134647.zip |
GPG initramfs append
Add function/handling to actually add the GPG binary to the initramfs
Diffstat (limited to 'gen_initramfs.sh')
-rwxr-xr-x | gen_initramfs.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh index f420a2d..65d849e 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -451,6 +451,25 @@ append_firmware() { rm -r "${TEMP}/initramfs-firmware-temp/" } +append_gpg() { + if [ -d "${TEMP}/initramfs-gpg-temp" ] + then + rm -r "${TEMP}/initramfs-gpg-temp" + fi + cd ${TEMP} + mkdir -p "${TEMP}/initramfs-gpg-temp/sbin/" + if [ ! -e ${GPG_BINCACHE} ] ; then + print_info 1 ' GPG: Adding support (compiling binaries)...' + compile_gpg + fi + bzip2 -dc "${GPG_BINCACHE}" > "${TEMP}/initramfs-gpg-temp/sbin/gpg" || + gen_die 'Could not extract gpg binary cache!' + chmod a+x "${TEMP}/initramfs-gpg-temp/sbin/gpg" + cd "${TEMP}/initramfs-gpg-temp/" + find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" + rm -rf "${TEMP}/initramfs-gpg-temp" > /dev/null +} + print_list() { local x @@ -641,6 +660,7 @@ create_initramfs() { append_data 'mdadm' "${MDADM}" append_data 'luks' "${LUKS}" append_data 'multipath' "${MULTIPATH}" + append_data 'gpg' "${GPG}" if [ "${NORAMDISKMODULES}" = '0' ] then |