refactor: harden diagnostics and consolidate runtime code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user