Commit 62913521 authored by Darko Poljak's avatar Darko Poljak

Merge branch 'os-release-fallbacks' into 'master'

explorer/os_release: Add fallbacks

See merge request ungleich-public/cdist!840
parents 0f420993 984e0dc8
Pipeline #785 passed with stage
in 52 seconds
#!/bin/sh
#
# 2018 Adam Dej (dejko.a at gmail.com)
# 2020 Dennis Camera (dennis.camera at ssrq-sds-fds.ch)
#
# This file is part of cdist.
#
......@@ -21,6 +22,17 @@
# See os-release(5) and http://0pointer.de/blog/projects/os-release
set +e
if test -f /etc/os-release
then
# Linux and FreeBSD (usually a symlink)
cat /etc/os-release
elif test -f /usr/lib/os-release
then
# systemd
cat /usr/lib/os-release
elif test -f /var/run/os-release
then
# FreeBSD (created by os-release service)
cat /var/run/os-release
fi
cat /etc/os-release || cat /usr/lib/os-release || true
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment