Normally, /etc/os-release should be regenerated at boot time.
If we don't boot after a userland update, the file won't be updated either.
Raise a warning if the file is not up-to-date, a critical error if it doesn't exist.
Ref T2007.
Differential D3416
Check if /etc/os-release is up-to-date on FreeBSD dereckson on Aug 10 2024, 11:39. Authored by Tags None Referenced Files
Subscribers None
Details Normally, /etc/os-release should be regenerated at boot time. Raise a warning if the file is not up-to-date, a critical error if it doesn't exist. Ref T2007. Tested on WindRiver
Diff Detail
Event TimelineComment Actions Hi, Comment Actions The -x option allows shellcheck to source the external files (here /var/run/os-release), so it can know $VERSION exists for example: $ shellcheck -x roles/core/monitoring/files/checks/nrpe/os_family/FreeBSD/check-os-release.sh $ echo $? 0 |