hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

Support multiple user-data? #158

Closed mrmillers closed 4 years ago

mrmillers commented 4 years ago

According to cloud-init, multiple user data file could be supplied. I was trying to do something like this:

flash -d /dev/sda \ --userdata user-data.yml \ # user config --userdata os-init.sh \ # a script to run on start up image.img

Only last file is copied.

mrmillers commented 4 years ago

A walk around is create the script with write_files section and invoke it with runcmd section. But this is a little bit inconvenient.

firecyberice commented 4 years ago

Currently there is a flag to copy additional files to the boot partition. This file can then be invoked in the runcmd section, but you do not need to use write_files for that.

But PRs to support multiple user-data files are also welcome. :smiley: Feel free to reopen this issue.