* [PATCH] cryptroot-ask: check that plymouth is running before use
@ 2011-03-10 22:54 Andrey Borzenkov
[not found] ` <1299797644-6951-1-git-send-email-arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Borzenkov @ 2011-03-10 22:54 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Otherwise there is no way to skip pasword prompt. --has-active-vt
seems to correctly catch also the case when plymouthd is started
but splash is disabled.
Signed-off-by: Andrey Borzenkov <arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
modules.d/90crypt/cryptroot-ask.sh | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
index 5150688..9c99ccc 100755
--- a/modules.d/90crypt/cryptroot-ask.sh
+++ b/modules.d/90crypt/cryptroot-ask.sh
@@ -80,9 +80,8 @@ if [ -n "$(getarg rd.luks.key)" ]; then
rmdir "$mntp"
unset mntp keypath keydev
else
- # Prompt for password with plymouth, if installed.
- # Should we check if plymouthd is running?
- if [ -x /bin/plymouth ]; then
+ # Prompt for password with plymouth, if installed and running.
+ if [ -x /bin/plymouth ] && /bin/plymouth --has-active-vt; then
prompt="Password [$device ($luksname)]:"
if [ ${#luksname} -gt 8 ]; then
sluksname=${sluksname##luks-}
--
tg: (661f9a3..) upstream/crypto-plymouth (depends on: origin/master)
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1299797644-6951-1-git-send-email-arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] cryptroot-ask: check that plymouth is running before use [not found] ` <1299797644-6951-1-git-send-email-arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2011-03-11 8:41 ` Harald Hoyer [not found] ` <4D79E052.6020806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Harald Hoyer @ 2011-03-11 8:41 UTC (permalink / raw) To: Andrey Borzenkov; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA Am 10.03.2011 23:54, schrieb Andrey Borzenkov: > Otherwise there is no way to skip pasword prompt. --has-active-vt > seems to correctly catch also the case when plymouthd is started > but splash is disabled. > > Signed-off-by: Andrey Borzenkov <arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > --- > modules.d/90crypt/cryptroot-ask.sh | 5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh > index 5150688..9c99ccc 100755 > --- a/modules.d/90crypt/cryptroot-ask.sh > +++ b/modules.d/90crypt/cryptroot-ask.sh > @@ -80,9 +80,8 @@ if [ -n "$(getarg rd.luks.key)" ]; then > rmdir "$mntp" > unset mntp keypath keydev > else > - # Prompt for password with plymouth, if installed. > - # Should we check if plymouthd is running? > - if [ -x /bin/plymouth ]; then > + # Prompt for password with plymouth, if installed and running. > + if [ -x /bin/plymouth ] && /bin/plymouth --has-active-vt; then > prompt="Password [$device ($luksname)]:" > if [ ${#luksname} -gt 8 ]; then > sluksname=${sluksname##luks-} Very nice! Thank you! ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <4D79E052.6020806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] cryptroot-ask: check that plymouth is running before use [not found] ` <4D79E052.6020806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2011-03-11 9:43 ` Andrey Borzenkov [not found] ` <AANLkTiktfbVu4SqV0Y+2=GQ3iGJjTGKXVJDHr0mEAMjf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Andrey Borzenkov @ 2011-03-11 9:43 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1451 bytes --] On Fri, Mar 11, 2011 at 11:41 AM, Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: > Am 10.03.2011 23:54, schrieb Andrey Borzenkov: >> Otherwise there is no way to skip pasword prompt. --has-active-vt >> seems to correctly catch also the case when plymouthd is started >> but splash is disabled. >> >> Signed-off-by: Andrey Borzenkov <arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >> --- >> modules.d/90crypt/cryptroot-ask.sh | 5 ++--- >> 1 files changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh >> index 5150688..9c99ccc 100755 >> --- a/modules.d/90crypt/cryptroot-ask.sh >> +++ b/modules.d/90crypt/cryptroot-ask.sh >> @@ -80,9 +80,8 @@ if [ -n "$(getarg rd.luks.key)" ]; then >> rmdir "$mntp" >> unset mntp keypath keydev >> else >> - # Prompt for password with plymouth, if installed. >> - # Should we check if plymouthd is running? >> - if [ -x /bin/plymouth ]; then >> + # Prompt for password with plymouth, if installed and running. >> + if [ -x /bin/plymouth ] && /bin/plymouth --has-active-vt; then >> prompt="Password [$device ($luksname)]:" >> if [ ${#luksname} -gt 8 ]; then >> sluksname=${sluksname##luks-} > > Very nice! Thank you! > I think attached patch still makes sense in addition to (or probably even instead of) this one. [-- Attachment #2: dracut-plymouth-password-retries.patch --] [-- Type: text/x-patch, Size: 977 bytes --] From: Andrey Borzenkov <arvidjaar@gmail.com> Subject: [PATCH] cryptoroot-ask: limit number of plymouth password requests Set number ot retries to 5 to align with non-plymouth case. Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com> --- modules.d/90crypt/cryptroot-ask.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh index 9c99ccc..4a65c23 100755 --- a/modules.d/90crypt/cryptroot-ask.sh +++ b/modules.d/90crypt/cryptroot-ask.sh @@ -92,7 +92,7 @@ else # flock against other interactive activities { flock -s 9; /bin/plymouth ask-for-password \ - --prompt "$prompt" \ + --prompt "$prompt" --number-of-tries=5 \ --command="/sbin/cryptsetup luksOpen -T1 $device $luksname" } 9>/.console.lock -- tg: (664193e..) upstream/passwd-retries (depends on: upstream/crypto-plymouth) ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <AANLkTiktfbVu4SqV0Y+2=GQ3iGJjTGKXVJDHr0mEAMjf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] cryptroot-ask: check that plymouth is running before use [not found] ` <AANLkTiktfbVu4SqV0Y+2=GQ3iGJjTGKXVJDHr0mEAMjf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-03-11 10:43 ` Harald Hoyer 2011-03-11 10:45 ` Harald Hoyer 1 sibling, 0 replies; 5+ messages in thread From: Harald Hoyer @ 2011-03-11 10:43 UTC (permalink / raw) To: Andrey Borzenkov; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA Am 11.03.2011 10:43, schrieb Andrey Borzenkov: > I think attached patch still makes sense in addition to (or probably > even instead of) this one. also ok for me ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cryptroot-ask: check that plymouth is running before use [not found] ` <AANLkTiktfbVu4SqV0Y+2=GQ3iGJjTGKXVJDHr0mEAMjf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2011-03-11 10:43 ` Harald Hoyer @ 2011-03-11 10:45 ` Harald Hoyer 1 sibling, 0 replies; 5+ messages in thread From: Harald Hoyer @ 2011-03-11 10:45 UTC (permalink / raw) To: Andrey Borzenkov; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA Am 11.03.2011 10:43, schrieb Andrey Borzenkov: > On Fri, Mar 11, 2011 at 11:41 AM, Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: >> Am 10.03.2011 23:54, schrieb Andrey Borzenkov: >>> Otherwise there is no way to skip pasword prompt. --has-active-vt >>> seems to correctly catch also the case when plymouthd is started >>> but splash is disabled. >>> >>> Signed-off-by: Andrey Borzenkov <arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> >>> --- >>> modules.d/90crypt/cryptroot-ask.sh | 5 ++--- >>> 1 files changed, 2 insertions(+), 3 deletions(-) >>> >>> diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh >>> index 5150688..9c99ccc 100755 >>> --- a/modules.d/90crypt/cryptroot-ask.sh >>> +++ b/modules.d/90crypt/cryptroot-ask.sh >>> @@ -80,9 +80,8 @@ if [ -n "$(getarg rd.luks.key)" ]; then >>> rmdir "$mntp" >>> unset mntp keypath keydev >>> else >>> - # Prompt for password with plymouth, if installed. >>> - # Should we check if plymouthd is running? >>> - if [ -x /bin/plymouth ]; then >>> + # Prompt for password with plymouth, if installed and running. >>> + if [ -x /bin/plymouth ] && /bin/plymouth --has-active-vt; then >>> prompt="Password [$device ($luksname)]:" >>> if [ ${#luksname} -gt 8 ]; then >>> sluksname=${sluksname##luks-} >> >> Very nice! Thank you! >> > > I think attached patch still makes sense in addition to (or probably > even instead of) this one. pushed both ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-11 10:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10 22:54 [PATCH] cryptroot-ask: check that plymouth is running before use Andrey Borzenkov
[not found] ` <1299797644-6951-1-git-send-email-arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-03-11 8:41 ` Harald Hoyer
[not found] ` <4D79E052.6020806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-03-11 9:43 ` Andrey Borzenkov
[not found] ` <AANLkTiktfbVu4SqV0Y+2=GQ3iGJjTGKXVJDHr0mEAMjf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-11 10:43 ` Harald Hoyer
2011-03-11 10:45 ` Harald Hoyer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox