From 8c36d1ba5dce0b99b2481d96d4603a82992205c0 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 5 Oct 2026 14:01:26 -0400 Subject: [PATCH] blancco-init: post_status uses sed, not tr The initrd's busybox has the tr applet but no /bin/tr link, so the quiet boot printed "/init: line 140: tr: not found" and the stage 1/2 dashboard posts were skipped. sed is linked. --- playbook/blancco-init.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbook/blancco-init.sh b/playbook/blancco-init.sh index 15be4d8..932b8d6 100644 --- a/playbook/blancco-init.sh +++ b/playbook/blancco-init.sh @@ -137,7 +137,8 @@ SERVER=172.16.9.1 # WinPE imaging clients use). Stage 1 also resets a finished tile for this # serial. Best effort: a webapp outage must never stop a wipe. post_status() { - serial=$(cat /sys/class/dmi/id/product_serial 2>/dev/null | tr -d '"\\') + # sed, not tr: the initrd's busybox has no tr link + serial=$(sed 's/["\\]//g' /sys/class/dmi/id/product_serial 2>/dev/null) [ -n "$serial" ] || return 0 wget -q -T 5 -O /dev/null --header 'Content-Type: application/json' \ --post-data "{\"serial\":\"$serial\",\"pctype\":\"blancco\",\"source\":\"blancco\",\"current_stage\":\"$2\",\"stage_index\":$1,\"stage_total\":7,\"status\":\"in_progress\",\"ip\":\"172.16.9.250\"}" \