Merge "labs: explain host/VM script interaction"

This commit is contained in:
Jenkins 2014-08-20 11:41:06 +00:00 committed by Gerrit Code Review
commit 1a3228d175
2 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,9 @@ function zero_empty_space {
sudo rm /filler
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Used by guest scripts to let osbash know they are running
# For guest scripts to let osbash know they are running; used when osbashauto
# runs scripts inside of the VM (STATUS_DIR directory must be shared between
# host and VM).
function indicate_current_auto {
if [ "${VM_SHELL_USER:-}" = "osbash" ]; then

View File

@ -154,6 +154,8 @@ function autostart_reset {
clean_dir "$STATUS_DIR"
}
# Wait until all autofiles are processed (indicated by a "$STATUS_DIR/done"
# file created either by osbashauto or ssh_process_autostart)
function wait_for_autofiles {
local DONE=false
shopt -s nullglob
@ -169,7 +171,8 @@ function wait_for_autofiles {
rm "$STATUS_DIR/done"
# Return only after checking for remaining *.sh.begin files
fi
# Note: begin files are only visible with a VirtualBox shared folder
# Note: begin files (created by indicate_current_auto) are only visible
# if the STATUS_DIR directory is shared between host and VM
local PROCESSING=("$STATUS_DIR"/*.sh.begin)
if [ -n "${PROCESSING[0]-}" ]; then
for f in "${PROCESSING[@]}"; do