|
|
@ -280,6 +280,39 @@ append_overlay(){
|
|
|
|
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
|
|
|
|
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
append_luks() {
|
|
|
|
|
|
|
|
if [ -d "${TEMP}/initramfs-luks-temp" ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
rm -r "${TEMP}/initramfs-luks-temp/"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "${TEMP}/initramfs-luks-temp/lib/luks"
|
|
|
|
|
|
|
|
cd "${TEMP}/initramfs-luks-temp"
|
|
|
|
|
|
|
|
if isTrue ${LUKS}
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
if is_static /bin/cryptsetup
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
print_info 1 "Including LUKS support"
|
|
|
|
|
|
|
|
rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
cp /bin/cryptsetup ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup"
|
|
|
|
|
|
|
|
elif is_static /sbin/cryptsetup
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
print_info 1 "Including LUKS support"
|
|
|
|
|
|
|
|
rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
cp /sbin/cryptsetup ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup"
|
|
|
|
|
|
|
|
print_info 1 "Not including LUKS support"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
|
|
|
|
|
|
|
|
|| gen_die "appending cryptsetup to cpio"
|
|
|
|
|
|
|
|
cd "${TEMP}"
|
|
|
|
|
|
|
|
rm -r "${TEMP}/initramfs-luks-temp/"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
append_firmware() {
|
|
|
|
append_firmware() {
|
|
|
|
if [ -z "${FIRMWARE_FILES}" -a ! -d "${FIRMWARE_DIR}" ]
|
|
|
|
if [ -z "${FIRMWARE_FILES}" -a ! -d "${FIRMWARE_DIR}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
@ -436,26 +469,6 @@ append_auxilary() {
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo 'MY_HWOPTS="${MY_HWOPTS} slowusb"' >> ${TEMP}/initramfs-aux-temp/etc/initrd.defaults
|
|
|
|
echo 'MY_HWOPTS="${MY_HWOPTS} slowusb"' >> ${TEMP}/initramfs-aux-temp/etc/initrd.defaults
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if isTrue ${LUKS}
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
if is_static /bin/cryptsetup
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
print_info 1 "Including LUKS support"
|
|
|
|
|
|
|
|
rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
cp /bin/cryptsetup ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup"
|
|
|
|
|
|
|
|
elif is_static /sbin/cryptsetup
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
print_info 1 "Including LUKS support"
|
|
|
|
|
|
|
|
rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
cp /sbin/cryptsetup ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
|
|
|
|
|
|
|
|
chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup"
|
|
|
|
|
|
|
|
print_info 1 "Not including LUKS support"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd ${TEMP}/initramfs-aux-temp/sbin && ln -s ../init init
|
|
|
|
cd ${TEMP}/initramfs-aux-temp/sbin && ln -s ../init init
|
|
|
|
cd ${TEMP}
|
|
|
|
cd ${TEMP}
|
|
|
@ -489,12 +502,13 @@ create_initramfs() {
|
|
|
|
|| gen_die "Could not create empty cpio at ${CPIO}"
|
|
|
|
|| gen_die "Could not create empty cpio at ${CPIO}"
|
|
|
|
|
|
|
|
|
|
|
|
append_data 'base_layout'
|
|
|
|
append_data 'base_layout'
|
|
|
|
append_data 'auxilary'
|
|
|
|
append_data 'auxilary' "${BUSYBOX}"
|
|
|
|
append_data 'busybox' "${BUSYBOX}"
|
|
|
|
append_data 'busybox' "${BUSYBOX}"
|
|
|
|
append_data 'lvm' "${LVM}"
|
|
|
|
append_data 'lvm' "${LVM}"
|
|
|
|
append_data 'dmraid' "${DMRAID}"
|
|
|
|
append_data 'dmraid' "${DMRAID}"
|
|
|
|
append_data 'evms' "${EVMS}"
|
|
|
|
append_data 'evms' "${EVMS}"
|
|
|
|
append_data 'mdadm' "${MDADM}"
|
|
|
|
append_data 'mdadm' "${MDADM}"
|
|
|
|
|
|
|
|
append_data 'luks' "${LUKS}"
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${NORAMDISKMODULES}" -eq '0' ]
|
|
|
|
if [ "${NORAMDISKMODULES}" -eq '0' ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|