refactor: harden diagnostics and consolidate runtime code

This commit is contained in:
Mikhail Chusavitin
2026-09-01 13:01:28 +03:00
parent ac4bc0b2b7
commit 0a6ca8ba0f
49 changed files with 1441 additions and 837 deletions
+5 -2
View File
@@ -359,9 +359,12 @@ validate_live_cmdline_params() {
bad = 1
}
$1 == command && has("boot=live") {
$1 == command {
live_entries++
if (!has("boot=live")) {
reject("missing boot=live")
}
if (!has("udev.children_max=1")) {
reject("missing udev.children_max=1")
}
@@ -432,7 +435,7 @@ validate_iso_live_boot_entries() {
exit 1
}
if grep -q '@APPEND_LIVE@\|@KERNEL_LIVE@\|@INITRD_LIVE@' "$grub_cfg" "$isolinux_cfg"; then
if grep -Eq '@[A-Z][A-Z_]*@' "$grub_cfg" "$isolinux_cfg"; then
echo "ERROR: unresolved live-build placeholders remain in ISO bootloader config" >&2
rm -f "$grub_cfg" "$isolinux_cfg"
exit 1