Add OS_RELEASE to /etc/os-release

This commit is contained in:
LinuxSquare 2023-10-20 15:16:35 +02:00
parent 8d5bc2f8f2
commit e219ede7eb
4 changed files with 4 additions and 3 deletions

View file

@ -32,7 +32,7 @@ system_bootloader_os-release:
file.keyvalue: file.keyvalue:
- name: /etc/os-release - name: /etc/os-release
- key_values: - key_values:
VERSION_ID: '"Timestamp: {{ CURRENT_SUBVOLUME_TIMESTAMP_HUMAN }} | Kernel: {{ KERNEL_VERSION }}"' RELEASE_INFO: '"Timestamp: {{ CURRENT_SUBVOLUME_TIMESTAMP_HUMAN }} | Kernel: {{ KERNEL_VERSION }}"'
- separator: '=' - separator: '='
- uncomment: '# ' - uncomment: '# '
- key_ignore_case: False - key_ignore_case: False

View file

@ -9,7 +9,7 @@ system_candy_motd:
- template: jinja - template: jinja
- context: - context:
OS_NAME: {{ salt['cmd.shell']('grep -E ^PRETTY_NAME /etc/os-release | cut -d= -f2') }} 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') }} OS_ISSUE_URL: {{ salt['cmd.shell']('grep -E ^BUG_REPORT_URL /etc/os-release | cut -d= -f2') }}
- user: root - user: root
- group: root - group: root

View file

@ -3,5 +3,6 @@ ID=noveriaos
ID_LIKE=alpine ID_LIKE=alpine
VERSION_ID="{{ OS_VERSION }}" VERSION_ID="{{ OS_VERSION }}"
PRETTY_NAME="NoveriaOS {{ OS_VERSION }}" PRETTY_NAME="NoveriaOS {{ OS_VERSION }}"
RELEASE_INFO="{{ RELEASE_INFO }}"
HOME_URL="https://noveria.org" HOME_URL="https://noveria.org"
BUG_REPORT_URL="https://git.noveria.org/NoveriaOS/iso/issues" BUG_REPORT_URL="https://git.noveria.org/NoveriaOS/iso/issues"

View file

@ -10,7 +10,7 @@
╚═══════════════════════════════════════════════╝ ╚═══════════════════════════════════════════════╝
OS: {{ OS_NAME }} OS: {{ OS_NAME }}
Version: {{ OS_VERSION }} Version: {{ OS_RELEASE_INFO }}
Report issues on: {{ OS_ISSUE_URL }} Report issues on: {{ OS_ISSUE_URL }}