diff --git a/system/bootloader.sls b/system/bootloader.sls index 5160225..60fe47a 100644 --- a/system/bootloader.sls +++ b/system/bootloader.sls @@ -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 }}