Merge pull request #555 from uqam-fob/explorer-os-etc-os-release

explorer/os: get ID from /etc/os-release
remotes/origin/4.6
Darko Poljak 7 years ago committed by GitHub
commit d3b4a5b2c1
  1. 8
      cdist/conf/explorer/os

@ -1,6 +1,7 @@
#!/bin/sh
#
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
# Copyright 2017, Philippe Gregoire <pg@pgregoire.xyz>
#
# This file is part of cdist.
#
@ -139,5 +140,12 @@ case "$uname_s" in
;;
esac
if [ -f /etc/os-release ]; then
# already lowercase, according to:
# https://www.freedesktop.org/software/systemd/man/os-release.html
awk -F= '/^ID=/ {print $2;}' /etc/os-release
exit 0
fi
echo "Unknown OS" >&2
exit 1

Loading…
Cancel
Save