Merge lp:~clint-fewbar/ubuntu/oneiric/upstart/add-plymouth-messages into lp:ubuntu/oneiric/upstart

Proposed by Clint Byrum
Status: Merged
Merged at revision: 1326
Proposed branch: lp:~clint-fewbar/ubuntu/oneiric/upstart/add-plymouth-messages
Merge into: lp:ubuntu/oneiric/upstart
Diff against target: 52 lines (+36/-1)
2 files modified
debian/changelog (+8/-0)
debian/conf/failsafe.conf (+28/-1)
To merge this branch: bzr merge lp:~clint-fewbar/ubuntu/oneiric/upstart/add-plymouth-messages
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+75278@code.launchpad.net

Description of the change

This attempts to make it as clear as possible to users what is blocking the system boot when they have interfaces defined in /etc/network/interfaces that cannot be brought up.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

+ $PLYMOUTH pause-progress || :

Why does the progress need to be paused? This probably makes no difference with the standard Ubuntu plymouth theme, since we simply cycle the dots on the screen, but for themes that do care about progress bars I'm not sure pausing is the right thing. Have you tried it without this change?

+ $PLYMOUTH message --text="Waiting for network configuration..." || :
+ sleep 40
+ $PLYMOUTH message --text="Waiting up to 60 more seconds for network configuration..." || :
+ sleep 59

What's the value in having two different messages here instead of just one? Is this to keep the user from thinking the machine has hung? (If so, see above about not pausing progress...?)

+ continue_boot () {
+ $PLYMOUTH unpause-progress || :
+ }

Does this work in practice, or does upstart kill the job with too much force?

Also, I think this leaves the last message on the screen - do we want to clear it instead?

+ sleep 1

Not sure what this buys us - is this to try to ensure there's time to see the message before plymouth exits?

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Re pause/unpause, I hadn't thought about it much, but I suppose it makes sense that its still "Making progress".

I feel like this is a situation that we're hoping nobody runs into who didn't hack on their system in a weird way. So its best to inform the user of whats going on so they don't get a frustrating experience. Another option would be to watch for a keystroke and let the user skip the wait.. but that seems more complicated than just updating the message a few times while we wait.

The EXIT trap works fine as long as the plymouth command finishes within 5 seconds, but I think I'll take out the pause/unpause anyway, as I have no good reason to do that.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-09-04 16:30:25 +0000
3+++ debian/changelog 2011-09-13 23:21:24 +0000
4@@ -1,3 +1,11 @@
5+upstart (1.3-0ubuntu8) UNRELEASED; urgency=low
6+
7+ * debian/conf/failsafe.conf: Add plymouth messages to help users
8+ understand why the system boot takes longer when they have
9+ static network interfaces defined. (LP: #847782)
10+
11+ -- Clint Byrum <clint@ubuntu.com> Tue, 13 Sep 2011 16:12:01 -0700
12+
13 upstart (1.3-0ubuntu7) oneiric; urgency=low
14
15 * debian/conf/failsafe.conf: raise timeout to 120 seconds to
16
17=== modified file 'debian/conf/failsafe.conf'
18--- debian/conf/failsafe.conf 2011-09-04 16:30:25 +0000
19+++ debian/conf/failsafe.conf 2011-09-13 23:21:24 +0000
20@@ -6,4 +6,31 @@
21 start on filesystem and net-device-up IFACE=lo
22 stop on runlevel
23
24-pre-start exec sleep 120
25+console output
26+
27+pre-start script
28+ # Determine if plymouth is available
29+ if [ -x /bin/plymouth ] && /bin/plymouth --ping ; then
30+ PLYMOUTH=/bin/plymouth
31+ else
32+ PLYMOUTH=":"
33+ fi
34+
35+ continue_boot () {
36+ $PLYMOUTH unpause-progress || :
37+ }
38+
39+ trap continue_boot EXIT
40+
41+ sleep 20
42+
43+ $PLYMOUTH pause-progress || :
44+ $PLYMOUTH message --text="Waiting for network configuration..." || :
45+ sleep 40
46+ $PLYMOUTH message --text="Waiting up to 60 more seconds for network configuration..." || :
47+ sleep 59
48+ $PLYMOUTH message --text="Booting system without full network configuration..." || :
49+ sleep 1
50+end script
51+
52+post-start exec logger -t 'failsafe' -p daemon.warning "Failsafe of 120 seconds reached." || :

Subscribers

People subscribed via source and target branches

to all changes: