On Thu, Aug 23, 2012 at 1:50 PM, Dan Kegel <d...@kegel.com> wrote: > On Thu, Aug 23, 2012 at 1:32 PM, Dan Kegel <d...@kegel.com> wrote: >> at the start of a build, use lxc-start-ephemeral -d to start the >> ephemeral container, > > It's somewhat annoying to parse out the name of the > ephemeral container from the log. Is there a right > way to get it? (Or can it be passed in as a parameter?)
Here's a little demo. Please poke holes in it and tell me how to really do this :-) #!/bin/sh sudo lxc-start-ephemeral -o test-container2 -d > log 2>&1 while ! grep "is running" log do sleep 1 done container=`awk '/is running/ {print $1}' log` sudo chroot /var/lib/lxc/$container/rootfs touch /xyzzy sudo chroot /var/lib/lxc/$container/rootfs ls -l /xyzzy sudo lxc-stop --name $container ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users