Files
sablink-distro/sys-kernel/genkernel/files/3.4.10/0001-If-etc-bootmsg-exists-include-in-initrd-initramfs.patch
T
2008-07-20 23:40:48 +00:00

82 lines
3.1 KiB
Diff

From 8f34d201ac1171b0a5e84c8c19824394ebddc6ba Mon Sep 17 00:00:00 2001
From: Wael Nasreddine <wael.nasreddine@sabayonlinux.org>
Date: Thu, 17 Jul 2008 23:22:07 +0200
Subject: [PATCH] If /etc/bootmsg exists, include in initrd/initramfs
Signed-off-by: Wael Nasreddine <wael.nasreddine@sabayonlinux.org>
---
:100644 100644 23afc63... a9804ef... M gen_initramfs.sh
:100644 100644 6b20c8d... 7aae958... M gen_initrd.sh
gen_initramfs.sh | 17 +++++++++++++++--
gen_initrd.sh | 14 ++++++++++++++
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 23afc63..a9804ef 100644
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -416,13 +416,26 @@ append_auxilary() {
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"
+ if [ -f "/etc/bootmsg" ]
+ then
+ print_info 2 "Copying the ASCII art message."
+ rm -f "${TEMP}/initramfs-aux-temp/etc/bootmsg"
+ cp "/etc/bootmsg" "${TEMP}/initramfs-aux-temp/etc/bootmsg" ||
+ gen_die "Luks error: could not copy ASCII art message."
+ fi
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"
-
+ chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup"
+ if [ -f "/etc/bootmsg" ]
+ then
+ print_info 2 "Copying the ASCII art message."
+ rm -f "${TEMP}/initramfs-aux-temp/etc/bootmsg"
+ cp "/etc/bootmsg" "${TEMP}/initramfs-aux-temp/etc/bootmsg" ||
+ gen_die "Luks error: could not copy ASCII art message."
+ fi
else
print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup"
print_info 1 "Not including LUKS support"
diff --git a/gen_initrd.sh b/gen_initrd.sh
index 6b20c8d..7aae958 100644
--- a/gen_initrd.sh
+++ b/gen_initrd.sh
@@ -171,12 +171,26 @@ create_base_initrd_sys() {
rm -f ${TEMP}/initrd-temp/sbin/cryptsetup
cp /bin/cryptsetup ${TEMP}/initrd-temp/sbin/cryptsetup
chmod +x "${TEMP}/initrd-temp/sbin/cryptsetup"
+ if [ -f "/etc/bootmsg" ]
+ then
+ print_info 2 "Copying the ASCII art message."
+ rm -f "${TEMP}/initramfs-aux-temp/etc/bootmsg"
+ cp "/etc/bootmsg" "${TEMP}/initramfs-aux-temp/etc/bootmsg" ||
+ gen_die "Luks error: could not copy ASCII art message."
+ fi
elif is_static /sbin/cryptsetup
then
print_info 1 "Including LUKS support"
rm -f ${TEMP}/initrd-temp/sbin/cryptsetup
cp /sbin/cryptsetup ${TEMP}/initrd-temp/sbin/cryptsetup
chmod +x "${TEMP}/initrd-temp/sbin/cryptsetup"
+ if [ -f "/etc/bootmsg" ]
+ then
+ print_info 2 "Copying the ASCII art message."
+ rm -f "${TEMP}/initramfs-aux-temp/etc/bootmsg"
+ cp "/etc/bootmsg" "${TEMP}/initramfs-aux-temp/etc/bootmsg" ||
+ gen_die "Luks error: could not copy ASCII art message."
+ fi
else
print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup"
print_info 1 "Not including LUKS support"
--
1.5.6.2