forked from ungleich-public/cdist
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:
commit
9a172b62cb
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ esac
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
# already lowercase, according to:
|
# already lowercase, according to:
|
||||||
# https://www.freedesktop.org/software/systemd/man/os-release.html
|
# 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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue