From 7377444f808ef4fa4d45c5a8b06f7bef7cacfbd9 Mon Sep 17 00:00:00 2001 From: termie Date: Wed, 28 Sep 2011 19:02:28 -0500 Subject: [PATCH] add auto tailing when building lxc --- build_lxc.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build_lxc.sh b/build_lxc.sh index 0817d1d..471b7dc 100755 --- a/build_lxc.sh +++ b/build_lxc.sh @@ -204,6 +204,9 @@ if [ ! -d "$DEST/devstack" ]; then git clone git://github.com/cloudbuilders/devstack.git $DEST/devstack fi cd $DEST/devstack && $STACKSH_PARAMS ./stack.sh > /$DEST/run.sh.log +echo >> /$DEST/run.sh.log +echo >> /$DEST/run.sh.log +echo "All done! Time to start clicking." >> /$DEST/run.sh.log EOF # Make the run.sh executable @@ -224,3 +227,20 @@ fi # Start our container lxc-start -d -n $CONTAINER + +# Done creating the container, let's tail the log +echo +echo "=============================================================" +echo " -- YAY! --" +echo "=============================================================" +echo +echo "We're done creating the container, about to start tailing the" +echo "stack.sh log. It will take a second or two to start." +echo +echo "Just CTRL-C at any time to stop tailing." + +while [ ! -e "$ROOTFS/$DEST/run.sh.log" ]; do + sleep 1 +done + +tail -F $ROOTFS/$DEST/run.sh.log