Create /sbin directory in append_luks for bug #250330
authorAndrew Gaffney <agaffney@gentoo.org>
Sat, 13 Dec 2008 22:13:36 +0000 (16:13 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sat, 13 Dec 2008 22:13:36 +0000 (16:13 -0600)
ChangeLog
gen_initramfs.sh

index 2a4e0e59920382435d1adca21ab9f11a6d6a9d0c..bbe7cf407a9d501e6abc939ee0215cf9f10d8e6c 100644 (file)
--- 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 <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:
   Disable creation of most standard devices nodes, since we're running mdev
 
index fc74fb8357b9d3070fb5723b3fbeec6003130df6..703919e897733d10a784d64107432adc2bf92e3d 100644 (file)
@@ -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/"
 }