Merge lp:~sergiusens/snappy/cmdline into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Sergio Schvezov on 2015-06-08
Status: Merged
Approved by: John Lenton on 2015-06-08
Approved revision: 490
Merged at revision: 489
Proposed branch: lp:~sergiusens/snappy/cmdline
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
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/cmdline
Reviewer Review Type Date Requested Status
John Lenton 2015-06-08 Approve on 2015-06-08
Review via email: mp+261434@code.launchpad.net

Commit Message

Support azure's kernel cmdline requirements

To post a comment you must log in.
lp:~sergiusens/snappy/cmdline updated on 2015-06-08
489. By Sergio Schvezov on 2015-06-08

Support azure's kernel cmdline requirements

John Lenton (chipaca) :
John Lenton (chipaca) :
review: Approve
lp:~sergiusens/snappy/cmdline updated on 2015-06-08
490. By Sergio Schvezov on 2015-06-08

Using grep instead of [ ]

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 18:44:31 +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+ channels_ini = "/etc/system-image/channels.ini"
19+ grep -q 'device: azure_amd64' "$channels_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