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

[explorer/os] Unquote values from /etc/os-release

See merge request ungleich-public/cdist!803
This commit is contained in:
poljakowski 2019-10-03 20:32:28 +02:00
commit 9a172b62cb

View file

@ -145,7 +145,7 @@ 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
awk -F= '/^ID=/ { if ($2 ~ /^'"'"'(.*)'"'"'$/ || $2 ~ /^"(.*)"$/) { print substr($2, 2, length($2) - 2) } else { print $2 } }' /etc/os-release
exit 0
fi