[grubcfg] Keep kernel_params as 'quiet' by default

- mark some TODO
- tighten up the YAML schema a little bit
- when unset, use 'quiet' rather than empty, to preserve compatibility
  with existing configuration files.

SEE #1882
This commit is contained in:
Adriaan de Groot 2022-01-31 12:38:13 +01:00
parent f7d4f049a7
commit 5b994f85c9
3 changed files with 9 additions and 4 deletions

View file

@ -29,10 +29,14 @@ prefer_grub_d: false
# kept, not updated to the *bootloaderEntryName* from the branding file.
# Use this if the GRUB_DISTRIBUTOR setting in the file is "smart" in
# some way (e.g. uses shell-command substitution).
#
# TODO:3.3:snake-case this key
keepDistributor: false
# The default kernel params that should always be applied
# This is an array of strings
# The default kernel params that should always be applied.
# This is an array of strings. If it is unset, the default is
# `["quiet"]`. To avoid the default, explicitly set this key
# to an empty list, `[]`.
kernel_params: [ "quiet" ]
# Default entries to write to /etc/default/grub if it does not exist yet or if

View file

@ -7,9 +7,10 @@ additionalProperties: false
type: object
properties:
overwrite: { type: boolean, default: false }
# TODO:3.3:snake-case this key
keepDistributor: { type: boolean, default: false }
prefer_grub_d: { type: boolean, default: false }
kernel_params: { type: array }
kernel_params: { type: array, items: { type: string } }
defaults:
type: object
additionalProperties: true # Other fields are acceptable

View file

@ -172,7 +172,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
if partition["fs"] == "zfs" and partition["mountPoint"] == "/":
zfs_root_path = get_zfs_root()
kernel_params = libcalamares.job.configuration.get("kernel_params", [])
kernel_params = libcalamares.job.configuration.get("kernel_params", ["quiet"])
# Currently, grub doesn't detect this properly so it must be set manually
if zfs_root_path: