/srv/irclogs.ubuntu.com/2016/11/14/#cloud-init.txt

Odd_Blokevans163: If your shell supports <(...), that might work?11:15
=== shardy is now known as shardy_lunch
=== shardy_lunch is now known as shardy
vans163Odd_Bloke: I need to try but it needs user-data AND meta-data,  does it just cat the two?14:13
vans163if it just needed one I would definetly try piping it in without thinking about it14:13
Odd_BlokeI would expect: genisoimage ... <(cat user-data) <(cat meta-data)14:14
vans163Odd_Bloke: let me try that thats a good idea14:33
smoservans163, you could just use cloud-localds too18:57
smoserwhich cleans up stuff, and provides the meta-data if you dont need it.18:57
vans163smoser: that is useful, so I can just pip the (cat user-data) into cloud-localds?  http://ubuntu-smoser.blogspot.ca/2013/02/using-ubuntu-cloud-images-without-cloud.html  this tutorial does not show how to account for the user-data supplied by user which can be a bash script19:04
smoseroh. i dont know if it supports user-data from - or not19:08
smoserlet me see19:08
smoserseems like it does19:08
vans163smoser: where are you looking if you dont mind me asking, googling does not seem to reveal any documentation19:09
smoser$ printf '#!/bin/sh\necho hi mom\n' | cloud-localds -v my.img -19:09
smoserwrote my.img with filesystem=iso9660 and diskformat=raw19:09
smoservans163,  i looked at source code :) and source code I wrote even ;)19:10
smoserhttp://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/view/head:/bin/cloud-localds19:10
smoserhttp://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/view/head:/bin/cloud-localds#L20619:10
smoserbut as Odd_Bloke suggested above, bash with <() basically makes a temp file and then cleans it up i think.19:11
vans163smoser: ty is that () really critical?  so in my case it would look like <("#cloud-config\npassword: ...") ?  does () not mean execute whats inside?19:12
smoservans163, see 'Process Substitution' in 'man bash'19:15
smoser$ bash -c 'for i in "$@"; do echo -n $i:; cat "$i"; done' -- <(echo first) <(echo another)19:16
smoser/dev/fd/63:first19:17
smoser/dev/fd/62:another19:17
smoserin your case, if you just need the one thing, then its sufficient to do like i did above with printf, or you could do a "here document"19:18
smoser$ cloud-localds -v my.img -  <<END> #!/bin/sh19:18
smoser> hi mom19:18
smoser> END19:18
smosernote, the '> ' are the prefix the shell added to m ulti line input.19:19
smosersell, shoot. but the '#!/bin/sh' was on a new line too' p19:19
smoserbetter: http://paste.ubuntu.com/23476971/19:19
vans163smoser: ah ty for that explain, i think if it works that way, geniso should do the trick,  I do not see the benefit of cloud-localds for simple usecase like mine19:27
powersjsmoser: why is there both a "set hostname (cc_set_hostname)" and an "update hostname (cc_update_hostname)" modules? They both use the same keys, so does that mean they both always get run when set?22:04
smoserpowersj, remind me again if i dont answer.22:10
smoseri have to go now htough22:10
powersjsmoser: will do thx22:11

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!