]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
Allow to enable serial console on the command line
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Sep 2023 15:37:31 +0000 (15:37 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Sep 2023 15:37:31 +0000 (15:37 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/bricklayer
src/python/__init__.py

index 2b5beb577be37af7ffb006dc9ada539cccc3d851..e5ac1e788961133d45661ecba8832185bea5ccce 100644 (file)
@@ -52,6 +52,8 @@ class Cli(object):
                        help=_("Enable unattended mode"))
                parser.add_argument("--disk", nargs="*", dest="disks", default=[],
                        help=_("A disk image file or device which will be used"))
+               parser.add_argument("--serial", action="store_true",
+                       help=_("Create an image using a serial console"))
 
                # Parse arguments
                return parser.parse_args()
index 339a67ab5669caf3cdfda263d09c40dfbace2dd7..ba7f59c7d5e658e8130a3445c527969597da1258 100644 (file)
@@ -49,7 +49,7 @@ class Bricklayer(object):
                Bricklayer's base class
        """
        def __init__(self, arch, pakfire_conf=None, first_install=False, debug=False,
-                       unattended=False, disks=[]):
+                       unattended=False, disks=[], serial=False):
                self.arch = arch
                self.pakfire_conf = pakfire_conf
                self.first_install = first_install
@@ -79,7 +79,7 @@ class Bricklayer(object):
                        "kernel-cmdline" : ["quiet", "splash"],
 
                        # Serial Console
-                       "serial-console"          : False,
+                       "serial-console"          : serial,
                        "serial-console-device"   : "ttyS0",
                        "serial-console-baudrate" : 115200,
                }