Merge lp:~sergiusens/snappy/backportAz into lp:~snappy-dev/snappy/15.04-deprecated

Proposed by Sergio Schvezov
Status: Merged
Approved by: John Lenton
Approved revision: 452
Merged at revision: 452
Proposed branch: lp:~sergiusens/snappy/backportAz
Merge into: lp:~snappy-dev/snappy/15.04-deprecated
Diff against target: 51 lines (+12/-2)
1 file modified
etc/grub.d/09_snappy (+12/-2)
To merge this branch: bzr merge lp:~sergiusens/snappy/backportAz
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+261449@code.launchpad.net

Commit message

Backport 09_snappy to support azure kernel cmdline requirements

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'etc/grub.d/09_snappy'
2--- etc/grub.d/09_snappy 2015-04-14 20:37:54 +0000
3+++ etc/grub.d/09_snappy 2015-06-08 20:08:41 +0000
4@@ -23,7 +23,6 @@
5
6 SNAPPY_OS="Ubuntu Core Snappy"
7 SNAPPY_TYPE=simple
8-SNAPPY_ARGS="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
9
10 #---------------------------------------------------------------------
11
12@@ -156,6 +155,14 @@
13 echo "$list"
14 }
15
16+# Composes and returns a kernel cmd line
17+get_cmdline() {
18+ channel_ini="/etc/system-image/channel.ini"
19+ grep -q 'device: azure_amd64' "$channel_ini" && azure_cmdline="rootdelay=300"
20+
21+ echo "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} $azure_cmdline"
22+}
23+
24 # Returns the path to the initrd for the kernel specified by $1.
25 # $1: kernel version.
26 # $2: directory to look in.
27@@ -290,6 +297,7 @@
28 local rel_dirname=
29 local version=
30 local initrd=
31+ local cmdline=
32
33 # boot by label
34 device="LABEL=$label"
35@@ -313,6 +321,8 @@
36
37 initrd=$(get_initrd "$version" "$dirname")
38
39+ cmdline=$(get_cmdline)
40+
41 # convert the path to the mounted "other" rootfs back to a
42 # a standard one by removing the mountpoint prefix.
43 if [ "$mountpoint" != "/" ]; then
44@@ -322,7 +332,7 @@
45
46 # Create menu entries for the 2 snappy rootfs's.
47 linux_entry_ext "$name" "$SNAPPY_OS" "$version" \
48- "$SNAPPY_TYPE" "$SNAPPY_ARGS" "$device" \
49+ "$SNAPPY_TYPE" "$cmdline" "$device" \
50 "$linux" "$initrd"
51 }
52

Subscribers

People subscribed via source and target branches