From: Michael Tremer Date: Thu, 14 Sep 2023 15:44:14 +0000 (+0000) Subject: Add switch to ignore kernel cmdline options X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e8a3d57ef4af24a079c7660d585c454f2cba9b4;p=people%2Fms%2Fbricklayer.git Add switch to ignore kernel cmdline options Signed-off-by: Michael Tremer --- diff --git a/src/bricklayer b/src/bricklayer index e5ac1e7..ef04347 100644 --- a/src/bricklayer +++ b/src/bricklayer @@ -54,6 +54,8 @@ class Cli(object): 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")) + parser.add_argument("--ignore-kernel-cmdline", action="store_true", + help=_("Ignores parsing the configuration from the kernel commandline")) # Parse arguments return parser.parse_args() diff --git a/src/python/__init__.py b/src/python/__init__.py index ba7f59c..84d8908 100644 --- a/src/python/__init__.py +++ b/src/python/__init__.py @@ -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=[], serial=False): + unattended=False, disks=[], serial=False, ignore_kernel_cmdline=False): self.arch = arch self.pakfire_conf = pakfire_conf self.first_install = first_install @@ -85,7 +85,8 @@ class Bricklayer(object): } # Parse the kernel command line - self._read_cmdline() + if ignore_kernel_cmdline: + self._read_cmdline() # Read OS information self.os = self._read_os_release()