image: support gadget specific cloud.conf file #2101

Merged
merged 1 commit into from Oct 5, 2016

Conversation

Projects
None yet
3 participants
Collaborator

mvo5 commented Oct 5, 2016

See https://trello.com/c/X0YtahWK for the other steps needed.

@@ -30,3 +30,6 @@ partition as `grub.cfg` and `uboot.env`. The bootloader configuration
contains the boot logic. Examples for the boot logic can be found in
the `pc` and the `pi2` gadget snaps.
+A cloud-init configuration may be provided at the toplevel of the
+gadget snap as `cloud.conf`. It will be copied into the image as
@zyga

zyga Oct 5, 2016

Contributor

Why .cfg vs .conf?

@niemeyer

niemeyer Oct 5, 2016

Contributor

Because that's consistent on our end. Gadget has:

cloud.conf
u-boot.conf
grub.conf

That said, I would prefer to not mention the implementation of it, stopping after cloud.conf above. We can change where this goes without it being a problem for people.

LGTM, feel free to tweak the config later so you don't need to wait for this today.

+ dst := filepath.Join(cloudDir, "cloud.cfg")
+ err = osutil.CopyFile(cloudConfig, dst, osutil.CopyFlagOverwrite)
+ } else {
+ dst := filepath.Join(cloudDir, "cloud-init.disabled")
@niemeyer

niemeyer Oct 5, 2016

Contributor

👍

Contributor

niemeyer commented Oct 5, 2016

Sorry, I meant tweak the docs.

Contributor

niemeyer commented Oct 5, 2016

Actually, to help you I just did that. Created a card for the doc fix, and merging it now.

@niemeyer niemeyer merged commit 6c66c37 into snapcore:master Oct 5, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment