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

Proposed by Clint Byrum
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) Approve
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.
Revision history for this message
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
=== modified file 'debian/ask-for-passphrase'
--- debian/ask-for-passphrase 2010-11-22 09:43:43 +0000
+++ debian/ask-for-passphrase 2011-12-07 00:53:25 +0000
@@ -23,16 +23,17 @@
2323
24prompt="Apache needs to decrypt your SSL Keys for $sitename ($keytype)24prompt="Apache needs to decrypt your SSL Keys for $sitename ($keytype)
25Please enter passphrase:"25Please enter passphrase:"
26if [ -x /bin/plymouth ] && plymouth --ping ; then26tty=`tty`
27 echo $prompt | logger27if [ "$tty" = "not a tty" ] ; then
28 exec plymouth ask-for-password --prompt="$prompt"28 # Apache gives us a pipe for stdin, but we want to
29else29 # talk to apache's terminal.
30 tty=`tty`30 tty=`tty < /proc/${PPID}/fd/0`
31 if [ "$tty" = "not a tty" ] ; then31 if [ "$tty" = "not a tty" ] ; then
32 # Apache gives us a pipe for stdin, but we want to32 if [ -x /bin/plymouth ] && plymouth --ping ; then
33 # talk to apache's terminal.33 echo $prompt | logger
34 tty=`tty < /proc/${PPID}/fd/0`34 exec plymouth ask-for-password --prompt="$prompt"
35 if [ "$tty" = "not a tty" ] ; then35 else
36 logger -p daemon.err -t apache2 "No way to ask user for passphrase"
36 exit 137 exit 1
37 fi38 fi
38 fi39 fi
3940
=== modified file 'debian/changelog'
--- debian/changelog 2011-12-02 17:36:28 +0000
+++ debian/changelog 2011-12-07 00:53:25 +0000
@@ -1,3 +1,11 @@
1apache2 (2.2.21-2ubuntu3) precise; urgency=low
2
3 * d/ask-for-passphrase: Flip the logic of this script so that it checks
4 first to see if apache is being started from a TTY, and then if not,
5 tries plymouth. (LP: #887410)
6
7 -- Clint Byrum <clint@ubuntu.com> Tue, 06 Dec 2011 16:49:33 -0800
8
1apache2 (2.2.21-2ubuntu2) precise; urgency=low9apache2 (2.2.21-2ubuntu2) precise; urgency=low
210
3 * No-change rebuild to drop spurious libsfgcc1 dependency on armhf.11 * No-change rebuild to drop spurious libsfgcc1 dependency on armhf.

Subscribers

People subscribed via source and target branches

to all changes: