From: Michael Tremer Date: Sun, 5 Feb 2023 19:50:19 +0000 (+0000) Subject: cmdline: Parse installer.unattended from cmdline X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abc6fdcfa1740c40ef63385deaaf223dbd3fa2ae;p=people%2Fms%2Fbricklayer.git cmdline: Parse installer.unattended from cmdline Signed-off-by: Michael Tremer --- diff --git a/src/bricklayer-master.in b/src/bricklayer-master.in index b4b7391..61b32c7 100644 --- a/src/bricklayer-master.in +++ b/src/bricklayer-master.in @@ -208,7 +208,7 @@ menuentry 'Install ${name} (${arch})' --class ${class} --id install { submenu 'Other Installation Options -->' { menuentry 'Unattended installation' --class ${class} --id install.unattended { - linux /boot/vmlinuz ${commandline[@]} installer.unattended=1 + linux /boot/vmlinuz ${commandline[@]} installer.unattended initrd /boot/initramfs.img } } diff --git a/src/python/__init__.py b/src/python/__init__.py index 5d40208..cabb9cd 100644 --- a/src/python/__init__.py +++ b/src/python/__init__.py @@ -356,15 +356,17 @@ class Bricklayer(object): # Split each word key, delim, value = word.partition("=") - # Skip any keywords - if not key or not value: - continue + # Parse console= options + if key == "console": + self._cmdline_handle_console(value) - if key.startswith("installer."): - self._cmdline_handle_keyword(key[10:], value) + # Activate unattended mode + elif key == "installer.unattended": + self.unattended = True - elif key == "console": - self._cmdline_handle_console(value) + # Handle any installer.* keywords + elif key.startswith("installer."): + self._cmdline_handle_keyword(key[10:], value) def _cmdline_handle_keyword(self, key, value): """