[explorer/os] Fix OS detection for openSUSE
All distros with ID_LIKE suse should be treated as "suse". My openSUSE Leap 15.1 installation has: ID_LIKE="suse opensuse" This patch doesn't require a strict "suse" value but only the word suse to be in the list.
This commit is contained in:
parent
7e1428ab3c
commit
b370b70ff4
1 changed files with 2 additions and 1 deletions
|
@ -144,7 +144,8 @@ esac
|
||||||
|
|
||||||
if [ -f /etc/os-release ]; then
|
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
|
# 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
|
echo suse
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue