Merge lp:~clint-fewbar/ubuntu/precise/apache2/fix-ask-for-passphrase into lp:ubuntu/precise/apache2

Proposed by Clint Byrum on 2011-12-07
Status: Merged
Merged at revision: 74
Proposed branch: lp:~clint-fewbar/ubuntu/precise/apache2/fix-ask-for-passphrase
Merge into: lp:ubuntu/precise/apache2
Diff against target: 46 lines (+18/-9)
2 files modified
debian/ask-for-passphrase (+10/-9)
debian/changelog (+8/-0)
To merge this branch: bzr merge lp:~clint-fewbar/ubuntu/precise/apache2/fix-ask-for-passphrase
Reviewer Review Type Date Requested Status
Alex Muntada (community) 2011-12-07 Approve on 2011-12-15
Review via email: mp+84699@code.launchpad.net

Description of the Change

See bug report and d/changelog. Fixes script so plymouth is used as the
last resort, instead of the TTY.

To post a comment you must log in.
Alex Muntada (alex.muntada) wrote :

After reviewing both the bug and the changes proposed, i agree with them.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/ask-for-passphrase'
2--- debian/ask-for-passphrase 2010-11-22 09:43:43 +0000
3+++ debian/ask-for-passphrase 2011-12-07 00:53:25 +0000
4@@ -23,16 +23,17 @@
5
6 prompt="Apache needs to decrypt your SSL Keys for $sitename ($keytype)
7 Please enter passphrase:"
8-if [ -x /bin/plymouth ] && plymouth --ping ; then
9- echo $prompt | logger
10- exec plymouth ask-for-password --prompt="$prompt"
11-else
12- tty=`tty`
13+tty=`tty`
14+if [ "$tty" = "not a tty" ] ; then
15+ # Apache gives us a pipe for stdin, but we want to
16+ # talk to apache's terminal.
17+ tty=`tty < /proc/${PPID}/fd/0`
18 if [ "$tty" = "not a tty" ] ; then
19- # Apache gives us a pipe for stdin, but we want to
20- # talk to apache's terminal.
21- tty=`tty < /proc/${PPID}/fd/0`
22- if [ "$tty" = "not a tty" ] ; then
23+ if [ -x /bin/plymouth ] && plymouth --ping ; then
24+ echo $prompt | logger
25+ exec plymouth ask-for-password --prompt="$prompt"
26+ else
27+ logger -p daemon.err -t apache2 "No way to ask user for passphrase"
28 exit 1
29 fi
30 fi
31
32=== modified file 'debian/changelog'
33--- debian/changelog 2011-12-02 17:36:28 +0000
34+++ debian/changelog 2011-12-07 00:53:25 +0000
35@@ -1,3 +1,11 @@
36+apache2 (2.2.21-2ubuntu3) precise; urgency=low
37+
38+ * d/ask-for-passphrase: Flip the logic of this script so that it checks
39+ first to see if apache is being started from a TTY, and then if not,
40+ tries plymouth. (LP: #887410)
41+
42+ -- Clint Byrum <clint@ubuntu.com> Tue, 06 Dec 2011 16:49:33 -0800
43+
44 apache2 (2.2.21-2ubuntu2) precise; urgency=low
45
46 * No-change rebuild to drop spurious libsfgcc1 dependency on armhf.

Subscribers

People subscribed via source and target branches

to all changes: