代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 65258a808a703de25f790b2cb5aff8e734228ad1 Mon Sep 17 00:00:00 2001
From: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Date: Mon, 7 Nov 2022 11:33:53 +0800
Subject: [PATCH] Support configuration of additional boot arguments
---
data/anaconda.conf | 2 ++
pyanaconda/argument_parsing.py | 2 +-
pyanaconda/core/configuration/bootloader.py | 8 ++++++++
pyanaconda/modules/storage/bootloader/base.py | 5 +++++
4 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/data/anaconda.conf b/data/anaconda.conf
index 703114a..b80440e 100644
--- a/data/anaconda.conf
+++ b/data/anaconda.conf
@@ -159,6 +159,8 @@ preserved_arguments =
biosdevname ipv6.disable net.ifnames net.ifnames.prefix
nosmt
+# Arguments added by default.
+additional_arguments =
[Storage]
# Enable dmraid usage during the installation.
diff --git a/pyanaconda/argument_parsing.py b/pyanaconda/argument_parsing.py
index 75f28f4..dd5ecdf 100644
--- a/pyanaconda/argument_parsing.py
+++ b/pyanaconda/argument_parsing.py
@@ -589,7 +589,7 @@ def getArgumentParser(version_string, boot_cmdline=None):
# some defaults change based on cmdline flags
if boot_cmdline is not None:
- if "console" in boot_cmdline:
+ if "console" in boot_cmdline and "inst.text" in boot_cmdline:
ap.set_defaults(display_mode=DisplayModes.TUI)
return ap
diff --git a/pyanaconda/core/configuration/bootloader.py b/pyanaconda/core/configuration/bootloader.py
index 6746e45..7b782d3 100644
--- a/pyanaconda/core/configuration/bootloader.py
+++ b/pyanaconda/core/configuration/bootloader.py
@@ -69,3 +69,11 @@ class BootloaderSection(Section):
:return: a list of kernel arguments
"""
return self._get_option("preserved_arguments", str).split()
+
+ @property
+ def additional_arguments(self):
+ """Arguments added by default.
+
+ :return: a list of kernel arguments
+ """
+ return self._get_option("additional_arguments", str).split()
diff --git a/pyanaconda/modules/storage/bootloader/base.py b/pyanaconda/modules/storage/bootloader/base.py
index be039c4..533d528 100644
--- a/pyanaconda/modules/storage/bootloader/base.py
+++ b/pyanaconda/modules/storage/bootloader/base.py
@@ -734,6 +734,7 @@ class BootLoader(object):
self._set_extra_boot_args(bootloader_proxy)
self._set_storage_boot_args(storage)
self._preserve_some_boot_args()
+ self._add_additional_boot_args()
self._set_graphical_boot_args()
self._set_security_boot_args()
@@ -908,6 +909,10 @@ class BootLoader(object):
self.boot_args.add(new_arg)
+ def _add_additional_boot_args(self):
+ for opt in conf.bootloader.additional_arguments:
+ self.boot_args.add(opt)
+
def _set_graphical_boot_args(self):
"""Set up the graphical boot."""
args = []
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。