From 001c5d1bee155c066e981ebf2d28012a32cd66fc Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 13 Dec 2008 16:13:36 -0600 Subject: [PATCH] Create /sbin directory in append_luks for bug #250330 --- ChangeLog | 3 +++ gen_initramfs.sh | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a4e0e5..bbe7cf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Distributed under the GPL v2 + 13 Dec 2008; Andrew Gaffney gen_initramfs.sh: + Create /sbin directory in append_luks for bug #250330 + 13 Dec 2008; Andrew Gaffney netboot/linuxrc.x: Disable creation of most standard devices nodes, since we're running mdev diff --git a/gen_initramfs.sh b/gen_initramfs.sh index fc74fb8..703919e 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -292,30 +292,32 @@ append_luks() { then rm -r "${TEMP}/initramfs-luks-temp/" 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" + if isTrue ${LUKS} then if is_static /bin/cryptsetup then print_info 1 "Including LUKS support" - rm -f ${TEMP}/initramfs-luks-temp/sbin/cryptsetup cp /bin/cryptsetup ${TEMP}/initramfs-luks-temp/sbin/cryptsetup chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup" elif is_static /sbin/cryptsetup then print_info 1 "Including LUKS support" - rm -f ${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 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/" } -- 2.26.2