Merge ~dannf/maas-images:i2c-arch-eval into maas-images:master

Proposed by dann frazier
Status: Merged
Merged at revision: 2fa7c2b048fc53f2074860159f17b814f5f641cc
Proposed branch: ~dannf/maas-images:i2c-arch-eval
Merge into: maas-images:master
Diff against target: 12 lines (+1/-1)
1 file modified
bin/kpack-from-image (+1/-1)
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
dann frazier (community) Needs Resubmitting
Review via email: mp+360955@code.launchpad.net

Commit message

Tested by cut & pasting the cat > <<EOF sequence at a shell prompt and diff'ing the results:

$ diff -u /tmp/foo /tmp/bar
--- /tmp/foo 2018-12-14 12:20:28.587326091 -0700
+++ /tmp/bar 2018-12-14 12:20:53.507404464 -0700
@@ -5,7 +5,7 @@
 copy_modules_dir kernel/drivers/net/usb # LP: #1552378
 manual_add_modules bcache # LP: #1513176
 manual_add_modules hpilo # LP: #1761639
-case amd64 in
+case $(dpkg --print-architecture) in
     arm64)
         manual_add_modules i2c-thunderx # LP: #1702976
         ;;

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

it might be more straight forward to just quote the EOF

cat > file <<"EOF"
this stuff gets verbatum

EOF

Revision history for this message
dann frazier (dannf) :
review: Needs Resubmitting
Revision history for this message
Scott Moser (smoser) wrote :

this looks fine to me. Thanks, Dan.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/kpack-from-image b/bin/kpack-from-image
2index 356f6bc..f2652a3 100755
3--- a/bin/kpack-from-image
4+++ b/bin/kpack-from-image
5@@ -183,7 +183,7 @@ kernel_from_mp() {
6 config_addl_modules() {
7 local root="${1:-/}" rel="$2" fname=""
8 fname="${root%/}/etc/initramfs-tools/hooks/kpack_extra"
9- cat > "$fname" <<EOF
10+ cat > "$fname" <<"EOF"
11 #!/bin/sh
12 . /usr/share/initramfs-tools/hook-functions
13

Subscribers

People subscribed via source and target branches