training-guides/labs/lib/wbatch/template-end_file_bat
Roger Luethi 271448cee6 Add Windows batch templates used by wbatch/osbash
The files added in this changeset are used by osbash as templates when
the user requests the creation of Windows batch files.

The names of the templates end on _bat rather than .bat because some
mail providers refuse to deliver .bat files even within archives.

The generated Windows batch files will have the proper extension (.bat).

Change-Id: I5dbed4bc6a4e30b50693208812d3dbfebecb2f19
Partial-Bug: 1312764
Implements: blueprint openstack-training-labs
2014-06-16 14:22:52 +02:00

48 lines
1.1 KiB
Batchfile

ECHO.
ECHO %time% Batch script seems to have succeeded.
ECHO.
GOTO :terminate
REM Note: vbm_error falls through to terminate
:vbm_error
ECHO.
ECHO %time% VBoxManage returned with an error. Aborting.
ECHO.
:terminate
ENDLOCAL
PAUSE
GOTO :eof
REM ============================================================================
REM
REM End of program, function definitions follow
REM
REM ============================================================================
:wait_auto
IF EXIST %STATUSDIR%\done (
DEL %STATUSDIR%\done
GOTO :eof
)
TIMEOUT /T 5 /NOBREAK
GOTO :wait_auto
REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
:wait_poweroff
VBoxManage showvminfo %~1 --machinereadable|findstr poweroff
IF %errorlevel% EQU 0 GOTO :eof
TIMEOUT /T 2 /NOBREAK
GOTO :wait_poweroff
REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
:vm_exists
VBoxManage list vms|findstr %~1
IF %errorlevel% NEQ 0 GOTO :eof
ECHO.
ECHO %time% VM %~1 already exists. Aborting.
ECHO.
GOTO :terminate
REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REM vim: set ai ts=4 sw=4 et ft=dosbatch: