From e219ede7ebee081fb989cfd2029275e4fb925537 Mon Sep 17 00:00:00 2001 From: LinuxSquare <7436714-OfficialLinuxSquare@users.noreply.gitlab.com> Date: Fri, 20 Oct 2023 15:16:35 +0200 Subject: [PATCH] Add OS_RELEASE to /etc/os-release --- system/bootloader.sls | 2 +- system/candy.sls | 2 +- system/files/base_os-release.jinja | 1 + system/files/candy_motd.jinja | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system/bootloader.sls b/system/bootloader.sls index 76a85b8..b0168ea 100644 --- a/system/bootloader.sls +++ b/system/bootloader.sls @@ -32,7 +32,7 @@ system_bootloader_os-release: file.keyvalue: - name: /etc/os-release - key_values: - VERSION_ID: '"Timestamp: {{ CURRENT_SUBVOLUME_TIMESTAMP_HUMAN }} | Kernel: {{ KERNEL_VERSION }}"' + RELEASE_INFO: '"Timestamp: {{ CURRENT_SUBVOLUME_TIMESTAMP_HUMAN }} | Kernel: {{ KERNEL_VERSION }}"' - separator: '=' - uncomment: '# ' - key_ignore_case: False diff --git a/system/candy.sls b/system/candy.sls index b23917b..b4588a5 100644 --- a/system/candy.sls +++ b/system/candy.sls @@ -9,7 +9,7 @@ system_candy_motd: - template: jinja - context: OS_NAME: {{ salt['cmd.shell']('grep -E ^PRETTY_NAME /etc/os-release | cut -d= -f2') }} - OS_VERSION: {{ salt['cmd.shell']('grep -E ^VERSION_ID /etc/os-release | cut -d= -f2') }} + OS_RELEASE_INFO: {{ salt['cmd.shell']('grep -E ^RELEASE_INFO /etc/os-release | cut -d= -f2') }} OS_ISSUE_URL: {{ salt['cmd.shell']('grep -E ^BUG_REPORT_URL /etc/os-release | cut -d= -f2') }} - user: root - group: root diff --git a/system/files/base_os-release.jinja b/system/files/base_os-release.jinja index a5d7c2e..98423e0 100644 --- a/system/files/base_os-release.jinja +++ b/system/files/base_os-release.jinja @@ -3,5 +3,6 @@ ID=noveriaos ID_LIKE=alpine VERSION_ID="{{ OS_VERSION }}" PRETTY_NAME="NoveriaOS {{ OS_VERSION }}" +RELEASE_INFO="{{ RELEASE_INFO }}" HOME_URL="https://noveria.org" BUG_REPORT_URL="https://git.noveria.org/NoveriaOS/iso/issues" \ No newline at end of file diff --git a/system/files/candy_motd.jinja b/system/files/candy_motd.jinja index 7defe58..ae20476 100644 --- a/system/files/candy_motd.jinja +++ b/system/files/candy_motd.jinja @@ -10,7 +10,7 @@ ╚═══════════════════════════════════════════════╝ OS: {{ OS_NAME }} -Version: {{ OS_VERSION }} +Version: {{ OS_RELEASE_INFO }} Report issues on: {{ OS_ISSUE_URL }}