diff --git a/cdist/conf/explorer/os b/cdist/conf/explorer/os index 094685ea..e0125c1b 100755 --- a/cdist/conf/explorer/os +++ b/cdist/conf/explorer/os @@ -1,6 +1,7 @@ #!/bin/sh # # 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# Copyright 2017, Philippe Gregoire # # 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 + grep '^ID=' /etc/os-release | sed -e 's|^ID=||' + exit 0 +fi + echo "Unknown OS" >&2 exit 1