[PATCH] Add support for plymouth

Guido Günther agx at sigxcpu.org
Mon Mar 22 21:09:30 UTC 2010


---
 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


--Qxx1br4bt0+wmkIi--



------------=_1278768070-13179-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 575024-close) by bugs.debian.org; 10 Jul 2010 13:17:17 +0000
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on busoni.debian.org
X-Spam-Level: 
X-Spam-Bayes: score:0.0000 Tokens: new, 7; hammy, 151; neutral, 468; spammy,
	0. spammytokens: hammytokens:0.000-+--HX-Debian:DAK,
	0.000-+--H*rp:D*ftp-master.debian.org, 0.000-+--HX-DAK:process-upload,
	0.000-+--HX-DAK:dak, 0.000-+--H*r:128.148.34
X-Spam-Status: No, score=-13.2 required=4.0 tests=AWL,BAYES_00,FOURLA,
	FROMDEVELOPER,FVGT_m_MULTI_ODD,HAS_BUG_NUMBER,IMPRONONCABLE_2,
	MURPHY_DRUGS_REL8,MURPHY_WRONG_WORD2,PGPSIGNATURE autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Return-path: <envelope at ftp-master.debian.org>
Received: from franck.debian.org ([128.148.34.3])
	from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=franck.debian.org,EMAIL=hostmaster at franck.debian.org (verified)
	by busoni.debian.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1OXZvg-0002tv-Vt
	for 575024-close at bugs.debian.org; Sat, 10 Jul 2010 13:17:17 +0000
Received: from dak by franck.debian.org with local (Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1OXZvZ-0007Rs-Ru; Sat, 10 Jul 2010 13:17:09 +0000
From: Jonas Meurer <mejo at debian.org>
To: 575024-close at bugs.debian.org
X-DAK: dak process-upload
X-Debian: DAK
X-Debian-Package: cryptsetup
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Subject: Bug#575024: fixed in cryptsetup 2:1.1.3-1
Message-Id: <E1OXZvZ-0007Rs-Ru at franck.debian.org>
Sender: Archive Administrator <dak at franck.debian.org>
Date: Sat, 10 Jul 2010 13:17:09 +0000

Source: cryptsetup
Source-Version: 2:1.1.3-1

We believe that the bug you reported is fixed in the latest version of
cryptsetup, which is due to be installed in the Debian FTP archive:

cryptsetup-udeb_1.1.3-1_amd64.udeb
  to main/c/cryptsetup/cryptsetup-udeb_1.1.3-1_amd64.udeb
cryptsetup_1.1.3-1.debian.tar.gz
  to main/c/cryptsetup/cryptsetup_1.1.3-1.debian.tar.gz
cryptsetup_1.1.3-1.dsc
  to main/c/cryptsetup/cryptsetup_1.1.3-1.dsc
cryptsetup_1.1.3-1_amd64.deb
  to main/c/cryptsetup/cryptsetup_1.1.3-1_amd64.deb
cryptsetup_1.1.3.orig.tar.bz2
  to main/c/cryptsetup/cryptsetup_1.1.3.orig.tar.bz2
libcryptsetup-dev_1.1.3-1_amd64.deb
  to main/c/cryptsetup/libcryptsetup-dev_1.1.3-1_amd64.deb
libcryptsetup1_1.1.3-1_amd64.deb
  to main/c/cryptsetup/libcryptsetup1_1.1.3-1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 575024 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Meurer <mejo at debian.org> (supplier of updated cryptsetup package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 10 Jul 2010 14:32:40 +0200
Source: cryptsetup
Binary: cryptsetup cryptsetup-udeb libcryptsetup1 libcryptsetup-dev
Architecture: source amd64
Version: 2:1.1.3-1
Distribution: unstable
Urgency: low
Maintainer: Debian Cryptsetup Team <pkg-cryptsetup-devel at lists.alioth.debian.org>
Changed-By: Jonas Meurer <mejo at debian.org>
Description: 
 cryptsetup - configures encrypted block devices
 cryptsetup-udeb - configures encrypted block devices (udeb)
 libcryptsetup-dev - libcryptsetup development files
 libcryptsetup1 - libcryptsetup shared library
Closes: 554506 575024 575652 576646 581712 585099 585418 585496 585664 585787 586019 586122 586162 586299 587220 587222 587224 588068
Changes: 
 cryptsetup (2:1.1.3-1) unstable; urgency=low
 .
   * new upstream release:
     - fix device alignment ioctl calls parameters for archs like ppc64.
     - fix activate_by_* API calls to handle NULL device name as documented
     - fix udev support for old libdevmapper with not compatible definition
   * fix rm_lo_setup() in cryptdisks.functions for failed device setup. thanks
     to Roger Pettersson. (closes: #581712)
   * add X-Stop-After headers to cryptdisks(-early) initscripts. this fixes
     shutdown process for system without encrypted rootfs at least. thanks to
     Alfredo Finelli. (closes: #575652)
   * more merges from ubuntu, thanks to and Steve Langasek (closes: #575024):
     - debian/cryptdisk.functions: initially create the device under a temporary
       name and rename it only at the end using 'dmsetup rename', to ensure that
       upstart/mountall doesn't see our device before it's ready to go.
       LP: #475936.
     - cryptdisks.functions: do_tmp should mount under /var/run/cryptsetup for
       changing the permissions of the filesystem root, not directly on /tmp,
       since mounting on /tmp a) is racy, b) confuses mountall something fierce.
       LP: #475936.
   * fix manpage checkscripts documentation. clarify that both cryptdisks and
     cryptroot invoke checkscripts. thanks Christoph Anton Mitterer.
   * remove quotes from $KEYSCRIPT invokation, thanks Alexandre Rossi.
     (closes: #585099)
   * fix support for commandline options to mkfs in luksformat. thanks to Eduard
     Bloch again for bugreport and patch. (closes: #585787)
   * remove duplicates from debian/NEWS, thanks Steve Langasek (closes: 586019)
   * improve documentation on environment variables in cryptdisks.default and
     crypttab manpage. thanks Christoph Anton Mitterer. (closes: #585664)
   * several improvements to (pre)check scripts, inspired by scripts from
     Christoph Anton Mitterer (closes: #585418, #585496)
     - checkscripts exit with error 1 if executables aren't available.
     - ext2, swap and xfs scripts are depreciated and invoke blkid script.
     - drop filtering of minix filesystem in blkid, util-linux 2.17.2 in debian
     - remove *vol_id check scripts, vol_id isn't available in debian any longer
     - don't use sed in *blkid check scripts any longer
   * fix initramfs/cryptroot-hook to canonicalize $device in get_resume_devices
     function. this should really weed out all duplicates. (closes: #586122),
     and catch all udev/device-mapper symlink setups as well (closes: #554506)
   * bash-completion file now in pck bash-completion (closes: #586299, #586162)
   * add a paragraph about the boot order of init scripts to README.Debian,
     describing the current catch-22 situation. (closes: #576646)
   * initscripts and cryptdisks_st* no longer silently quit in case that include
     file /lib/cryptsetup/cryptdisks.functions is missing. (closes: #587220)
   * fix cryptdisks-early LSB headers to restore legacy boot sequence order.
     mdadm-raid was started before cryptdisks-early. (closes: #587224)
   * cryptdisks initscript now raises a warning for failed started devices, and
     cryptdisks-early initscript raises a warning for failed stopped devices.
     this makes the initscript actions far more transparent to users. same holds
     for cryptdisks_st*. thanks to Christoph Anton Mitterer. (closes: #587222)
   * remove lintian overrides init.d-script-should-depend-on-virtual-facility
     as lintian lintian 2.4.2 has fixed #580082.
   * bump standards-version to 3.9.0, remove version information from replaces/
     provides/conflicts against cryptsetup-luks, change conflicts against
     hashalot (<= 0.3-1) to breaks hashalot (<< 0.3-1) and add replaces.
   * fix loads of typos, thanks to Christoph Anton Mitterer. (closes: #588068)
   * update copyright years and list Milan Broz in debian/copyright
Checksums-Sha1: 
 f423776f6297d4c1779fa79e3a1179d7e1a3711f 1844 cryptsetup_1.1.3-1.dsc
 6f8a4c9a80a0d25f8492dfce6db6abed221598f6 499276 cryptsetup_1.1.3.orig.tar.bz2
 87499331d74cc6672eab9d730929753e283e18f2 73036 cryptsetup_1.1.3-1.debian.tar.gz
 d3bbc36144059e8711ebccaa88de190cd035d4f7 412762 cryptsetup_1.1.3-1_amd64.deb
 c9fb3b0ce7a28147a79097a411a711194805ef6a 297470 cryptsetup-udeb_1.1.3-1_amd64.udeb
 588ddce1f21b5f61db3f3d084e2b10db8ecb7f2d 77078 libcryptsetup1_1.1.3-1_amd64.deb
 91036332b4dde0a3e7e83f7fc5003943433cc6e2 41072 libcryptsetup-dev_1.1.3-1_amd64.deb
Checksums-Sha256: 
 3fa939def9bc5d6d55fdf4294c97427cd44df3b0edc90de0c7e0387514828fb6 1844 cryptsetup_1.1.3-1.dsc
 9c8e68a272f6d9cfb6cd65cc0743f4c44a2096c61f74e0602bf40208b5e69c0a 499276 cryptsetup_1.1.3.orig.tar.bz2
 192bb74e169255be98f5aed7105c80d9da681728b632b81957b1943f7ad39bdd 73036 cryptsetup_1.1.3-1.debian.tar.gz
 0a6d759643b073fb52723d27e216922b2e1905ea54840faa90d40297210ebe3b 412762 cryptsetup_1.1.3-1_amd64.deb
 2379a71e6cbb10be65c5051b7b20b839f39a8d3231026db21468c6de37656a05 297470 cryptsetup-udeb_1.1.3-1_amd64.udeb
 ac4a84e4703c7c944ac7782c5cd7c169bac32ab8d521ca53d7aeb1c76d9dfc39 77078 libcryptsetup1_1.1.3-1_amd64.deb
 9e2e6d9eb81358c00863d45d037167cbf9b73a483ce63a85b0e3d27ee453886e 41072 libcryptsetup-dev_1.1.3-1_amd64.deb
Files: 
 e3a4e032b01ded88dc376262c982b422 1844 admin optional cryptsetup_1.1.3-1.dsc
 318a64470861ea5b92a52f2014f1e7c1 499276 admin optional cryptsetup_1.1.3.orig.tar.bz2
 001520ca62db51930cd1d1ca883fc249 73036 admin optional cryptsetup_1.1.3-1.debian.tar.gz
 de3a714955cb77d730553aac29638e36 412762 admin optional cryptsetup_1.1.3-1_amd64.deb
 b819572d6ba96c40c8d2e79ab83653d5 297470 debian-installer optional cryptsetup-udeb_1.1.3-1_amd64.udeb
 0ed309cfeb9b16cca4ef7984928bef48 77078 libs optional libcryptsetup1_1.1.3-1_amd64.deb
 35cdd38f1ec3550409e814d8eed55240 41072 libdevel optional libcryptsetup-dev_1.1.3-1_amd64.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJMOGnEAAoJEHUY1PcOVR4zmeEH/3O81UW7w//flCuswQkvA23L
rWqa0z8g1p/H4aUutfcdFmILj4aci5KuM5pvYcdeZmJImXZbka7/CnuNtzaZuM/7
2IxhrYA49KbocAF8Zu6wAvHD/5qRpujabVJcrSA3GQtHga2YO41wjOCS9RRSHl89
XMQ7vslHozH/JQGFxV6GuvgnjQNu/E9l0rmuxeWGJijwbpdVe6vVUQEF3tievs5M
Rdv1Ol0b/JtmWo+m6Erp5yXk5MXtxUi3IqmsFSPuNv3MiuM6etgL1rzMHN4g9pGZ
V16AwY2LnyoJuMWDUBGT4xvhP7ZVCCYAiFXQoKs5cOCitrPU7Y+kX2Rm4gHnfjQ=
=lXmi
-----END PGP SIGNATURE-----



------------=_1278768070-13179-0--



More information about the pkg-cryptsetup-devel mailing list