Share accounts: an older live Blancco release warns instead of failing

A fresh server gets boot-tools/blancco from the USB, which can be an older
Blancco (7.15.1) than our preferences (7.20). The version guard refused to
patch its config.img and the exception failed the whole share apply, so the
first-boot playbook failed. refresh_live_prefs() now returns a warning for
config.img and still writes the served preferences.xml (UEFI path).
This commit is contained in:
cproudlock
2026-10-17 12:40:00 -04:00
parent 7572692b84
commit c2b0c3d35e
4 changed files with 37 additions and 7 deletions

View File

@@ -53,8 +53,8 @@ def site_settings():
request.form.get("wifi_ssid", ""),
request.form.get("wifi_password", ""))
# Served preferences.xml and the live config.img (BIOS path).
changed = bu.refresh_live_prefs()
except (OSError, ValueError, bu.StageBlocked) as e:
changed, warning = bu.refresh_live_prefs()
except (OSError, ValueError) as e:
flash(f"Blancco site settings not saved: {e}", "danger")
return _back()
s = blancco_prefs.public()
@@ -62,6 +62,8 @@ def site_settings():
f"password={'set' if s['wifi_password_set'] else 'empty'}")
flash("Blancco site settings saved" + (" and preferences.xml updated." if changed else " (no change)."),
"success")
if warning:
flash(f"Blancco: {warning}", "warning")
return _back()