diff options
author | Jan Wagner <waja@cyconet.org> | 2025-08-01 21:33:39 +0200 |
---|---|---|
committer | Jan Wagner <waja@cyconet.org> | 2025-08-01 21:38:45 +0200 |
commit | 278954117cabd8e76941d4191a2692bfdeb39372 (patch) | |
tree | 514c18f9f7390cf702b5cfe5c6e60ddb599ca712 | |
parent | 1dfb5a0c10881b43cb60cf93bab63648c61201b5 (diff) | |
download | monitoring-plugins-27895411.tar.gz |
(Re)construct PLATFORM_ID as it's droped since Fedora 43
See https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID?#Drop_PLATFORM_ID
-rw-r--r-- | .github/os_detect.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.github/os_detect.sh b/.github/os_detect.sh index 47c762d3..3c5956de 100644 --- a/.github/os_detect.sh +++ b/.github/os_detect.sh | |||
@@ -22,4 +22,7 @@ else | |||
22 | return 1 | 22 | return 1 |
23 | fi | 23 | fi |
24 | export distro_id=$(grep '^ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') | 24 | export distro_id=$(grep '^ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') |
25 | export version_id=$(grep '^VERSION_ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') | ||
25 | export platform_id=$(grep '^PLATFORM_ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g'| cut -d":" -f2) | 26 | export platform_id=$(grep '^PLATFORM_ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g'| cut -d":" -f2) |
27 | # Fedora dropped PLATFORM_ID: https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID?#Drop_PLATFORM_ID | ||
28 | if [ -z $platform_id ]; then export platform_id=$(echo ${distro_id:0:1}${version_id}); fi | ||