Add conditional BIOS-update sub-stage on idx=1
winpe-status-push.ps1 now accepts -CurrentStage / -StageIndex params so callers can override the default "WinPE: PESetup / WIM apply" string. Backwards compatible. startnet.cmd: after the existing initial WinPE status push, inspect $BIOS_STATUS for the "->" marker that check-bios.cmd writes when an update was actually applied or staged. If present, fire a second idx=1 push with stage="WinPE: BIOS firmware update - <status>". No-op for clean "up to date" / "no update in catalog" runs. imaging.html: at stage_idx=1 with "bios" in current_stage, swap friendly label to "Updating BIOS firmware" with a do-NOT-power-off hint. Bays without firmware updates show the default "Booting from PXE" label as before. boot.wim startnet.cmd updated via wimupdate so live PXE clients pick it up at next boot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -254,6 +254,20 @@ if exist "Y:\scripts\winpe-status-push.ps1" (
|
|||||||
powershell -NoProfile -ExecutionPolicy Bypass -File "Y:\scripts\winpe-status-push.ps1"
|
powershell -NoProfile -ExecutionPolicy Bypass -File "Y:\scripts\winpe-status-push.ps1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM --- BIOS update sub-stage push ---
|
||||||
|
REM If check-bios.cmd actually applied or staged a firmware update, push
|
||||||
|
REM a second idx=1 status with a BIOS-specific stage string so the
|
||||||
|
REM dashboard friendly-label swaps to "Updating BIOS firmware". The "->"
|
||||||
|
REM marker is what check-bios writes for both "updated" and "STAGED"
|
||||||
|
REM cases. No-op states ("up to date", "no update in catalog", "Skipped",
|
||||||
|
REM "missing") never contain the arrow and stay on the default label.
|
||||||
|
echo %BIOS_STATUS% | findstr /C:"->" >NUL
|
||||||
|
if not errorlevel 1 (
|
||||||
|
if exist "Y:\scripts\winpe-status-push.ps1" (
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -File "Y:\scripts\winpe-status-push.ps1" -CurrentStage "WinPE: BIOS firmware update - %BIOS_STATUS%"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
echo Waiting for PESetup.exe to start...
|
echo Waiting for PESetup.exe to start...
|
||||||
:wait_start
|
:wait_start
|
||||||
ping -n 3 127.0.0.1 >NUL
|
ping -n 3 127.0.0.1 >NUL
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ param(
|
|||||||
[string]$PxeServer = '172.16.9.1',
|
[string]$PxeServer = '172.16.9.1',
|
||||||
[int]$Port = 9009,
|
[int]$Port = 9009,
|
||||||
[int]$TimeoutSec = 5,
|
[int]$TimeoutSec = 5,
|
||||||
[string]$PCType = $env:PCTYPE
|
[string]$PCType = $env:PCTYPE,
|
||||||
|
[string]$CurrentStage = 'WinPE: PESetup / WIM apply',
|
||||||
|
[int]$StageIndex = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
$logFile = 'X:\Windows\Temp\winpe-status-push.log'
|
$logFile = 'X:\Windows\Temp\winpe-status-push.log'
|
||||||
@@ -54,8 +56,8 @@ if (-not $serial) {
|
|||||||
$payload = @{
|
$payload = @{
|
||||||
serial = $serial
|
serial = $serial
|
||||||
pctype = $PCType
|
pctype = $PCType
|
||||||
current_stage = 'WinPE: PESetup / WIM apply'
|
current_stage = $CurrentStage
|
||||||
stage_index = 1
|
stage_index = $StageIndex
|
||||||
stage_total = 8
|
stage_total = 8
|
||||||
status = 'in_progress'
|
status = 'in_progress'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,12 @@ window.addEventListener('DOMContentLoaded', scheduleImagingReload);
|
|||||||
{% set is_done = s.status == 'succeeded' %}
|
{% set is_done = s.status == 'succeeded' %}
|
||||||
{% set border = 'danger' if is_failed else ('success' if is_done else 'primary') %}
|
{% set border = 'danger' if is_failed else ('success' if is_done else 'primary') %}
|
||||||
{% set friendly = stage_labels.get(stage_idx, ('Stage ' ~ stage_idx, '')) %}
|
{% set friendly = stage_labels.get(stage_idx, ('Stage ' ~ stage_idx, '')) %}
|
||||||
|
{# Stage 1 sub-phase: if WinPE pushed a BIOS update stage string, #}
|
||||||
|
{# show a BIOS-specific friendly label. Otherwise default idx=1. #}
|
||||||
|
{% if stage_idx == 1 and s.current_stage and 'bios' in s.current_stage|lower %}
|
||||||
|
{% set friendly = ('Updating BIOS firmware',
|
||||||
|
'WinPE detected a firmware update for this model. Do NOT power off until the next reboot. Imaging continues afterward.') %}
|
||||||
|
{% endif %}
|
||||||
{# Stage 7 fans out by sub-phase. Monitor pushes different stage #}
|
{# Stage 7 fans out by sub-phase. Monitor pushes different stage #}
|
||||||
{# strings as it crosses each Phase 1-4 boundary. Swap friendly #}
|
{# strings as it crosses each Phase 1-4 boundary. Swap friendly #}
|
||||||
{# label based on which keyword shows up. #}
|
{# label based on which keyword shows up. #}
|
||||||
|
|||||||
Reference in New Issue
Block a user