]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
cmdline: Parse installer.unattended from cmdline
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Feb 2023 19:50:19 +0000 (19:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Feb 2023 19:50:19 +0000 (19:50 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/bricklayer-master.in
src/python/__init__.py

index b4b7391ea39d0c3c2cab33e4a29df635e17ed89d..61b32c7b2352ba3e9e21723b3d819bb1619916de 100644 (file)
@@ -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
        }
 }
index 5d402081bf4689f6f2b32f9f9591beb6c03bf47c..cabb9cd1958dbc9db7971c28a9dec94f0383cf8f 100644 (file)
@@ -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):
                """