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\"}" \