diff --git a/shared/templates/grub2_bootloader_argument_absent/bash.template b/shared/templates/grub2_bootloader_argument_absent/bash.template index 8d7d6e9ea833..583b975a135d 100644 --- a/shared/templates/grub2_bootloader_argument_absent/bash.template +++ b/shared/templates/grub2_bootloader_argument_absent/bash.template @@ -3,4 +3,8 @@ See the OVAL template for more comments. Product-specific categorization should be synced across all template content types -#}} +if {{{ bash_bootc_build() }}} ; then + sed -i -E '/kargs\s+=\s+\["{{{ ARG_NAME }}}.*"\]/d' /usr/lib/bootc/kargs.d/*.toml +else {{{ grub2_bootloader_argument_absent_remediation(ARG_NAME) }}} +fi diff --git a/shared/templates/grub2_bootloader_argument_absent/oval.template b/shared/templates/grub2_bootloader_argument_absent/oval.template index e59b944cbd7b..813fca5703ba 100644 --- a/shared/templates/grub2_bootloader_argument_absent/oval.template +++ b/shared/templates/grub2_bootloader_argument_absent/oval.template @@ -32,6 +32,7 @@ {{{ oval_metadata("Ensure " + ARG_NAME + " is not set in the kernel line in /etc/default/grub.") }}} + {{% if system_with_kernel_options_in_grubenv -%}} {{% if system_with_bios_and_uefi_support -%}} @@ -77,6 +78,13 @@ {{%- endif %}} + {{% if bootable_containers_supported == "true" %}} + + + + + {{% endif %}} + {{%- if system_with_kernel_options_in_etc_default_grub %}} @@ -174,4 +182,17 @@ {{%- endif %}} {{%- endif %}} +{{% if bootable_containers_supported == "true" %}} + + + + + /usr/lib/bootc/kargs.d/ + ^.*\.toml$ + ^kargs = \["{{{ ARG_NAME }}}.*"\]$ + 1 + +{{% endif %}}