← Back to team overview

cloud-init team mailing list archive

Re: Where (if anywhere) do MIME-bundled x-shellscripts get placed?



You should find your shellscript mime payload in:


Example use and check:


On Thu, Aug 27, 2020 at 12:00 PM Bean Taxi <beantaxi@xxxxxxxxx> wrote:

> Hello all!
> I have a simple multipart MIME with a cloud-config part and a simple
> x-shellscript part. It is working fine. But _before_ it was working fine, I
> tried troubleshooting by looking around for the x-shellscript to be dropped
> in /var/lib/cloud/scripts/per-instance, and then broadened my search to
> /var/lib/cloud, and never found it. Ultimately I apparently fixed my issue,
> and my script started executing on instance creation, and it was all good.
> But I still never saw a script getting copied where I expected it.
> From reading the code for cloudinit/handlers/shellscript.py, it looks
> like the script should be copied to the per-instance folder somewhere
> similar. But it's slow going for me to understand the code and I could
> easily be missing something. So I figured I'd just ask.
> Does that file get copied somewhere I'm not looking? Or is it run 'in
> place' from the MIME file, or perhaps from a persisted user-data file of
> some sort?
> Thanks!
> Bean
> --
> Mailing list: https://launchpad.net/~cloud-init
> Post to     : cloud-init@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~cloud-init
> More help   : https://help.launchpad.net/ListHelp

Follow ups