Create /sbin directory in append_luks for bug #250330

cleanup-cruft
Andrew Gaffney 16 years ago
parent a0e576e3a7
commit 001c5d1bee

@ -2,6 +2,9 @@
# Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
# Distributed under the GPL v2 # Distributed under the GPL v2
13 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> gen_initramfs.sh:
Create /sbin directory in append_luks for bug #250330
13 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> netboot/linuxrc.x: 13 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> netboot/linuxrc.x:
Disable creation of most standard devices nodes, since we're running mdev Disable creation of most standard devices nodes, since we're running mdev

@ -292,30 +292,32 @@ append_luks() {
then then
rm -r "${TEMP}/initramfs-luks-temp/" rm -r "${TEMP}/initramfs-luks-temp/"
fi fi
mkdir -p "${TEMP}/initramfs-luks-temp/lib/luks"
mkdir -p "${TEMP}/initramfs-luks-temp/lib/luks/"
mkdir -p "${TEMP}/initramfs-luks-temp/sbin"
cd "${TEMP}/initramfs-luks-temp" cd "${TEMP}/initramfs-luks-temp"
if isTrue ${LUKS} if isTrue ${LUKS}
then then
if is_static /bin/cryptsetup if is_static /bin/cryptsetup
then then
print_info 1 "Including LUKS support" print_info 1 "Including LUKS support"
rm -f ${TEMP}/initramfs-luks-temp/sbin/cryptsetup
cp /bin/cryptsetup ${TEMP}/initramfs-luks-temp/sbin/cryptsetup cp /bin/cryptsetup ${TEMP}/initramfs-luks-temp/sbin/cryptsetup
chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup" chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
elif is_static /sbin/cryptsetup elif is_static /sbin/cryptsetup
then then
print_info 1 "Including LUKS support" print_info 1 "Including LUKS support"
rm -f ${TEMP}/initramfs-luks-temp/sbin/cryptsetup
cp /sbin/cryptsetup ${TEMP}/initramfs-luks-temp/sbin/cryptsetup cp /sbin/cryptsetup ${TEMP}/initramfs-luks-temp/sbin/cryptsetup
chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup" chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
else else
print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup" print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup"
print_info 1 "Not including LUKS support" print_info 1 "Not including LUKS support"
fi fi
fi fi
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
|| gen_die "appending cryptsetup to cpio" || gen_die "appending cryptsetup to cpio"
cd "${TEMP}" cd "${TEMP}"
rm -r "${TEMP}/initramfs-luks-temp/" rm -r "${TEMP}/initramfs-luks-temp/"
} }

Loading…
Cancel
Save