Package: cryptsetup
Version: 2:1.1.0-2
Severity: wishlist
Hi,
in order to properly support plymouth graphical boot splash we need to
also allow for "plymouth ask-for-pass-phrase" to ask for the password
ini the initramfs. I took this verbatim from the Ubuntu cryptsetup
package. Can this be applied?
Cheers,
-- Guido
>From 00981cddea6477f9ea10e19947d6ab3bf5e226c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <[email protected]>
Date: Mon, 22 Mar 2010 22:09:30 +0100
Subject: [PATCH] Add support for plymouth
---
debian/initramfs/cryptroot-script | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/debian/initramfs/cryptroot-script b/debian/initramfs/cryptroot-script
index 8c11a57..bff6eae 100644
--- a/debian/initramfs/cryptroot-script
+++ b/debian/initramfs/cryptroot-script
@@ -30,7 +30,9 @@ esac
#
message()
{
- if [ -p /dev/.initramfs/usplash_outfifo ] && [ -x /sbin/usplash_write ]; then
+ if [ -x /bin/plymouth ] && plymouth --ping; then
+ plymouth message --text="$@"
+ elif [ -p /dev/.initramfs/usplash_outfifo ] && [ -x /sbin/usplash_write ]; then
usplash_write "TEXT-URGENT $@"
else
echo "$@" >&2
@@ -289,12 +291,17 @@ setup_mapping()
return 1
fi
+
if [ -z "$cryptkeyscript" ]; then
- cryptkeyscript="/lib/cryptsetup/askpass"
cryptkey="Unlocking the disk $cryptsource ($crypttarget)\nEnter passphrase: "
+ if [ -x /bin/plymouth ] && plymouth --ping; then
+ cryptkeyscript="plymouth ask-for-password --prompt"
+ cryptkey=$(echo -e "$cryptkey")
+ else
+ cryptkeyscript="/lib/cryptsetup/askpass"
+ fi
fi
-
if ! crypttarget="$crypttarget" cryptsource="$cryptsource" \
$cryptkeyscript "$cryptkey" | $cryptcreate --key-file=- ; then
message "cryptsetup: cryptsetup failed, bad password or options?"
--
1.7.0