Merge branch 'fix/explorer/os/opensuse' into 'master'

explorer/os: Fix OS detection for openSUSE

See merge request ungleich-public/cdist!924
This commit is contained in:
poljakowski 2020-08-15 21:06:31 +02:00
commit 4082359a2f
1 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,8 @@ esac
if [ -f /etc/os-release ]; then
# after sles15, suse don't provide an /etc/SuSE-release anymore, but there is almost no difference between sles and opensuse leap, so call it suse
if grep -q ^ID_LIKE=\"suse\" /etc/os-release 2>/dev/null; then
if (. /etc/os-release && echo "${ID_LIKE}" | grep -q '\(^\|\ \)suse\($\|\ \)')
then
echo suse
exit 0
fi