[20:27] Hi! [20:29] I found that $USER is not set in a runcmd script, but whoami says root. What kind of shell environment should I expect in a runcmd script? [20:32] infogulch: no shell at all, I would say. the command gets run straight out of cloud-init [20:32] you could of course run "bash -c 'command you actuallly want'" [20:33] but that may or may not make sense. what are you trying to achieve? [20:33] Well i'm using the second mode. From the docs: "If the item is a string, it will be written to a file and interpreted using sh." [20:33] I'm writing it as: runcmd: |\n[shell commands....] [20:34] which i guess is basically equivalent to "sh -c 'commands...'" [20:35] oh right. also, apparently $USER is not set by the shell, but even before it on regular login: https://unix.stackexchange.com/questions/76354/who-sets-user-and-username-environment-variables [20:36] which you don't have (a login) [20:36] Ah ok that explains it [20:36] Hmm that makes me wonder what else I'm missing [20:36] so i suppose everything you can find in the POSIX shell standard should work [20:39] Ok. I guess I'm not intimately familiar with the posix shell standard [20:41] Thank you! [20:46] infogulch: I haven't done this myself, but if you run `env > /tmp/env` in a runcmd, you should get an idea of what you can expect. [20:47] That's a good idea thank you