Merge lp:~smoser/vmbuilder/automated-ec2-builds.lp1035279 into lp:~ubuntu-on-ec2/vmbuilder/automated-ec2-builds

Proposed by Scott Moser
Status: Merged
Merged at revision: 499
Proposed branch: lp:~smoser/vmbuilder/automated-ec2-builds.lp1035279
Merge into: lp:~ubuntu-on-ec2/vmbuilder/automated-ec2-builds
Diff against target: 41 lines (+17/-14)
1 file modified
vmbuilder-cloudimg-fixes (+17/-14)
To merge this branch: bzr merge lp:~smoser/vmbuilder/automated-ec2-builds.lp1035279
Reviewer Review Type Date Requested Status
Ben Howard Pending
Review via email: mp+120410@code.launchpad.net

Description of the change

set GRUB_RECORDFAIL_TIMEOUT=0 on precise image builds

Previously, only quantal builds set GRUB_RECORDFAIL_TIMEOUT=0.

This also combines the setting of GRUB_TIMEOUT into a single location.
Previously, it was updated in one place for natty or later, and
a different location for quantal or later. Instead, we set a variable
and update based on that.

The other change done here is to move the RECORDFAIL and GRUB_TIMEOUT
changes outside of the 'GRUB_HIDDEN_TIMEOUT' block.
That block was also protected by 'dist_ge natty'.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'vmbuilder-cloudimg-fixes'
2--- vmbuilder-cloudimg-fixes 2012-08-17 20:45:05 +0000
3+++ vmbuilder-cloudimg-fixes 2012-08-20 15:29:23 +0000
4@@ -221,20 +221,23 @@
5 -e 's/^\(GRUB_HIDDEN_TIMEOUT_QUIET=.*\)/#\1/' \
6 -e 's,^#GRUB_TERMINAL=console,GRUB_TERMINAL=console,' \
7 "${rootd}/etc/default/grub"
8-
9- # Eliminate grub time on Quantal or later
10- if dist_ge "${codename}" quantal; then
11- sed -i -e 's,^GRUB_TIMEOUT=.*,GRUB_TIMEOUT=0,' \
12- "${rootd}/etc/default/grub"
13-
14- # Make recordfail setting permanent
15- printf "\n%s\n%s\n" "#Disable recordfail timeout" \
16- "GRUB_RECORDFAIL_TIMEOUT=0" >> "${rootd}/etc/default/grub"
17-
18- elif dist_ge "${codename}" natty; then
19- sed -i -e 's,^GRUB_TIMEOUT=.*,GRUB_TIMEOUT=5,' \
20- "${rootd}/etc/default/grub"
21- fi
22+ fi
23+
24+ # on natty or later, modify/shorten GRUB_TIMEOUT
25+ if dist_ge "${codename}" natty; then
26+ new_timeout=5
27+ # quantal removes the timeout entirely
28+ dist_ge "$codename" quantal && new_timeout=0
29+
30+ sed -i -e "s,^GRUB_TIMEOUT=.*,GRUB_TIMEOUT=${new_timeout}," \
31+ "${rootd}/etc/default/grub"
32+ fi
33+
34+ # on precise or later, do not hang at grub prompt after incomplete boot.
35+ # This requires a grub feature also. (LP: #1035279, LP: #669481)
36+ if dist_ge "${codename}" precise; then
37+ printf "\n%s\n%s\n" "#Disable recordfail timeout" \
38+ "GRUB_RECORDFAIL_TIMEOUT=0" >> "${rootd}/etc/default/grub"
39 fi
40
41 _xchroot "${rootd}" /bin/sh -c \

Subscribers

People subscribed via source and target branches