hypriot / flash

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

how can i install a package by means of a user-data file #170

Open altineller opened 4 years ago

altineller commented 4 years ago

Hello, After Install, I would like to run:

sudo apt install libnss-mdns

Can I accomplish it by putting it on where:

`runcmd:

` after the ifup wlan0?

Best regards, C.

janz93 commented 4 years ago

Hello @altineller if I understand the issue correctly you want to use libnss-mdns package. I am also very new to cloud init myself but if I understand the documentation correctly you can add it in the package section. You need to add the package section in the file which you import via --userdata|-u

You file should look similar to the following:

#cloud-config
...
packages:
 - libnss-mdns
...

Maybe this will answer your question