From 2abe15a711f76e8a28701f87b70bba16dd5cdaab Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 6 Sep 2014 17:37:55 +0000 Subject: [PATCH] nightly: Try harder to get vendor stuff. /etc/issue.net might just contain control chars (like \S) a generic welcome message or omit the precise version. The newest standard is /etc/os-release http://www.freedesktop.org/software/systemd/man/os-release.html Otherwise there is often lsb_release http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html Try those first, fall back to /etc/issue.net if neither is there. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14482 --- nightly/bin/nightly | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nightly/bin/nightly b/nightly/bin/nightly index aebf3e5103..bef93a24be 100755 --- a/nightly/bin/nightly +++ b/nightly/bin/nightly @@ -222,7 +222,11 @@ if [ "x$libc_so" != "x" ]; then fi libc=`echo $libc | sed "s/, by Roland.*//"` uname_stuff="`uname -mrs`" -if [ -e "/etc/issue.net" -a -r "/etc/issue.net" ]; then +if [ -r /etc/os-release ]; then + vendor_stuff="`source /etc/os-release; echo ${NAME} ${VERSION}`" +elif which lsb_release 2>&1 > /dev/null; then + vendor_stuff="`lsb_release -sicr | xargs echo`" +elif [ -e "/etc/issue.net" -a -r "/etc/issue.net" ]; then vendor_stuff="`cat /etc/issue.net | head -1`" else vendor_stuff="unknown" -- 2.47.2