Escape the output of lsb-release.
There can be problematic characters in the output of lsb_release -s -d e.g.: Debian GNU/Linux 9.8 (stretch) which later leads to the error: /etc/update-motd.d/lsb-release: line 1: syntax error near unexpected token `(' Escaping the output fixed it.
This commit is contained in:
parent
993a304c5d
commit
824f7cb02b
|
@ -38,4 +38,4 @@ fi
|
|||
echo -e " "$DISTRIB_DESCRIPTION "(kernel "$(uname -r)")\n"
|
||||
|
||||
# Update the information for next time
|
||||
printf "DISTRIB_DESCRIPTION=%s" "$(lsb_release -s -d)" > /etc/update-motd.d/lsb-release &
|
||||
printf "DISTRIB_DESCRIPTION=\"%s\"" "$(lsb_release -s -d)" > /etc/update-motd.d/lsb-release &
|
||||
|
|
Loading…
Reference in New Issue