From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mr Dash Four Subject: Re: crypt-cleanup.sh question Date: Wed, 27 Oct 2010 14:17:06 +0100 Message-ID: <4CC82652.3090500@googlemail.com> References: <4CC6C571.8010406@googlemail.com> <4CC6E7C1.1050703@googlemail.com> <4CC7F15C.7090600@redhat.com> <4CC815E4.4060705@googlemail.com> <4CC82448.80403@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id :disposition-notification-to:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=hkPlt/VYHOeGM8uhAxsCQoePqERE1J1rvtme982rP4I=; b=QZmOO/4gtBzWlM3kQOqS6nU1TbPQBUsc1Q0+6f/pBje5w+8Pvw83zbFa4Z+MO/zKfp Tz3bqtWd2ILVzxy9VJ7vCwDycXn0mKAKBoZSTU/GgmyJinXJAY2F71lvGl0YD38pkkHx 2FNnMvnCTWmYa6TUeFrvaXSOmqq7LGKhH2rZY= In-Reply-To: <4CC82448.80403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Harald Hoyer Cc: initramfs > Hmm, maybe this could do it: > > > diff --git a/modules.d/90crypt/crypt-cleanup.sh > b/modules.d/90crypt/crypt-cleanup.sh > index e9fc6ba..4722425 100755 > --- a/modules.d/90crypt/crypt-cleanup.sh > +++ b/modules.d/90crypt/crypt-cleanup.sh > @@ -4,6 +4,11 @@ > # close everything which is not busy > rm -f /etc/udev/rules.d/70-luks.rules >/dev/null 2>&1 > > +if getargs rd_LUKS_UUID || getarg rd_NO_LUKS; then > + # do not clean up, if we did not autoassemble > + exit 0 > +fi > + > while true; do > local do_break="y" > for i in /dev/mapper/luks-*; do That is good, but I have a better idea (currently implementing it - will post the patch later today) - keep open only the partitions specified via rd_LUKS_UUID and close everything else. Close everything if rd_NO_LUKS is used (there shouldn't be any LUKS partitions open if that parameter was used, but you can't be too careful!). How's that? On a side note: I thought rd_LUKS_UUID, rd_LUKS_KEYPATH, rd_LUKS_KEYDEV and rd_NO_LUKS are sort of 'deprecated' in favour of the new rd.luks.* format - is that not the case? Another query - is there any particular reason why all rd_LUKS_UUID need to be mapped to luks-UUID? I'd rather be able to choose a more meaningful name than the 'standard' luks-UUID - just a thought.