From db89813ef9bb387978825f8d5b923aa27ff82bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ospal=C3=BD?= Date: Wed, 10 Jun 2020 14:19:16 +0200 Subject: [PATCH] M #-: Fix 'REPORT_READY' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + improve cleanup Signed-off-by: Petr OspalĂ˝ --- context.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/context.ps1 b/context.ps1 index f229569..0539d89 100644 --- a/context.ps1 +++ b/context.ps1 @@ -793,7 +793,7 @@ function reportReady() try { - $body = 'READY = YES' + $body = 'READY=YES' $target= $oneGateEndpoint + '/vm' [System.Net.HttpWebRequest] $webRequest = [System.Net.WebRequest]::Create($target) @@ -935,7 +935,14 @@ if(Test-Path $contextScriptPath) { renameComputer $context runScripts $context $contextLetter reportReady +} + +# Cleanup at the end +if ($contextDrive) { + # Eject CD with 'context.sh' if requested ejectContextCD $contextDrive +} else { + # Delete 'context.sh' if not on CD-ROM removeContextFile $contextScriptPath }