Browse code

add auto tailing when building lxc

termie authored on 2011/09/29 09:02:28
Showing 1 changed files
... ...
@@ -204,6 +204,9 @@ if [ ! -d "$DEST/devstack" ]; then
204 204
     git clone git://github.com/cloudbuilders/devstack.git $DEST/devstack
205 205
 fi
206 206
 cd $DEST/devstack && $STACKSH_PARAMS ./stack.sh > /$DEST/run.sh.log
207
+echo >> /$DEST/run.sh.log
208
+echo >> /$DEST/run.sh.log
209
+echo "All done! Time to start clicking." >> /$DEST/run.sh.log
207 210
 EOF
208 211
 
209 212
 # Make the run.sh executable
... ...
@@ -224,3 +227,20 @@ fi
224 224
 
225 225
 # Start our container
226 226
 lxc-start -d -n $CONTAINER
227
+
228
+# Done creating the container, let's tail the log
229
+echo
230
+echo "============================================================="
231
+echo "                          -- YAY! --"
232
+echo "============================================================="
233
+echo
234
+echo "We're done creating the container, about to start tailing the"
235
+echo "stack.sh log. It will take a second or two to start."
236
+echo
237
+echo "Just CTRL-C at any time to stop tailing."
238
+
239
+while [ ! -e "$ROOTFS/$DEST/run.sh.log" ]; do
240
+  sleep 1
241
+done
242
+
243
+tail -F $ROOTFS/$DEST/run.sh.log