Skip to content

Commit

Permalink
Fix grub command
Browse files Browse the repository at this point in the history
The fix-text had specified running:

  grubby --update-kernel=ALL

However, the results in no update to the scan-checked file. Need to
actually execute:

  /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
  • Loading branch information
ferricoxide committed Jun 4, 2024
1 parent 90c989d commit 3311a11
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
{%- from tplroot ~ '/el9/RuleById/common/grub2_info.jinja' import grubUser with context %}
{%- set skipIt = salt.pillar.get('ash-linux:lookup:skip-stigs', []) %}
{%- set mustSet = salt.pillar.get('ash-linux:lookup:grub-passwd', '') %}
{%- set grubCfg = '/boot/grub2/grub.cfg' %}
{%- set grubUserFile = '/etc/grub.d/01_users' %}
{%- set grubPassFile = '/boot/grub2/user.cfg' %}
{%- set grubUtil = '/bin/grub2-mkpasswd-pbkdf2' %}
Expand All @@ -143,9 +144,9 @@ Set GRUB2 super-user to {{ grubUser }} in {{ grubUserFile }}:
- pattern: '^(|\s*)(set superusers=)\".*\"'
- repl: '\1\2="{{ grubUser }}"'
Update grub.cfg as needed:
Update {{ grubCfg }} as needed:
cmd.run:
- name: '/sbin/grubby --update-kernel=ALL'
- name: '/usr/sbin/grub2-mkconfig -o {{ grubCfg }}'
- onchanges:
- file: Set GRUB2 super-user to {{ grubUser }} in {{ grubUserFile }}
{%- else %}
Expand Down

0 comments on commit 3311a11

Please sign in to comment.