Kiosk bootstrap: look for the installer where staging actually puts it
The bootstrap looked for C:\Enrollment\kiosk\Install-ShopdbKiosk.ps1, but startnet copies the type-specific tree to C:\Enrollment\shopfloor-setup\gea-shopfloor-display\ - so the payload lands beside the bootstrap, not under C:\Enrollment. As written it would have logged "Installer not staged" on every 15-minute cycle and never installed anything, with no error anywhere. Exactly the silent-failure shape this whole day has been about, and it would have looked like the API being unreachable. Resolves via a -KioskRoot parameter defaulting to kiosk\ next to the script, so the bootstrap and its payload travel together regardless of where the tree is staged. display-type.txt still comes from EnrollmentRoot, which is correct - that one really is at C:\Enrollment.
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
.PARAMETER EnrollmentRoot
|
||||
Where imaging staged things. Expects:
|
||||
<root>\display-type.txt Dashboard | Lobby | 3DPrintRoom
|
||||
<root>\kiosk\Install-ShopdbKiosk.ps1
|
||||
<root>\kiosk\shopdb-key.txt (optional) line1 collector.ingest PAT,
|
||||
line2 geenforce.fetch PAT
|
||||
and, beside this script (see -KioskRoot):
|
||||
kiosk\Install-ShopdbKiosk.ps1
|
||||
kiosk\shopdb-key.txt (optional) labelled: collector=..., fetch=...
|
||||
|
||||
.PARAMETER TaskName
|
||||
The scheduled task to remove once installation succeeds.
|
||||
@@ -42,6 +42,15 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string]$EnrollmentRoot = 'C:\Enrollment',
|
||||
|
||||
# Where the staged installer and key live. Defaults to kiosk\ NEXT TO THIS
|
||||
# SCRIPT, not under EnrollmentRoot: startnet copies the whole type-specific
|
||||
# tree to
|
||||
# C:\Enrollment\shopfloor-setup\gea-shopfloor-display\
|
||||
# so the payload arrives beside this file, not at C:\Enrollment\kiosk.
|
||||
# Getting this wrong is silent - the bootstrap just logs "not staged" every
|
||||
# cycle and never installs anything.
|
||||
[string]$KioskRoot = (Join-Path $PSScriptRoot 'kiosk'),
|
||||
[string]$BaseUrl = 'https://tsgwp00525.wjs.geaerospace.net/shopdb',
|
||||
[string]$TaskName = 'ShopDB Kiosk Bootstrap',
|
||||
[int]$TimeoutSeconds = 30
|
||||
@@ -93,7 +102,7 @@ if ($displayType -notin @('Dashboard','Lobby','3DPrintRoom')) {
|
||||
}
|
||||
Log "DisplayType: $displayType"
|
||||
|
||||
$installer = Join-Path $EnrollmentRoot 'kiosk\Install-ShopdbKiosk.ps1'
|
||||
$installer = Join-Path $KioskRoot 'Install-ShopdbKiosk.ps1'
|
||||
if (-not (Test-Path $installer)) {
|
||||
Log "Installer not staged at $installer. Leaving armed."
|
||||
return
|
||||
@@ -118,7 +127,7 @@ try {
|
||||
}
|
||||
|
||||
# --- keys ----------------------------------------------------------------
|
||||
$keyFile = Join-Path $EnrollmentRoot 'kiosk\shopdb-key.txt'
|
||||
$keyFile = Join-Path $KioskRoot 'shopdb-key.txt'
|
||||
$collectorKey = ''
|
||||
$fetchToken = ''
|
||||
if (Test-Path $keyFile) {
|
||||
|
||||
Reference in New Issue
Block a user