Fix menuentry state in bootloader.sls

This commit is contained in:
LinuxSquare 2023-07-16 20:27:11 +02:00
parent e1e2b0cb77
commit bb9bff45d2

View file

@ -73,8 +73,6 @@ system_bootloader_remove_default_menuentry:
- system_bootloader_install
- system_bootloader_config
{% set CUSTOM_MENUENTRY_HEADER = salt['cmd.shell']('head -n5 /etc/grub.d/40_custom') %}
system_bootloader_menuentry:
file.blockreplace:
- name: /etc/grub.d/40_custom
@ -85,10 +83,8 @@ system_bootloader_menuentry:
- context:
CURRENT_SUBVOLUME_TIMESTAMP_HUMAN: {{ CURRENT_SUBVOLUME_TIMESTAMP_HUMAN }}
CURRENT_SUBVOLUME_TIMESTAMP: {{ CURRENT_SUBVOLUME_TIMESTAMP }}
- prepend_if_not_found: true
- require:
- system_base_pkgs
- system_bootloader_pkgs
- system_bootloader_remove_default_menuentry
file.append:
- name: /etc/grub.d/40_custom
- content: {{ CUSTOM_MENUENTRY_HEADER }}