]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
nightly: Try harder to get vendor stuff.
authorMark Wielaard <mark@klomp.org>
Sat, 6 Sep 2014 17:37:55 +0000 (17:37 +0000)
committerMark Wielaard <mark@klomp.org>
Sat, 6 Sep 2014 17:37:55 +0000 (17:37 +0000)
/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

index aebf3e5103f801a7d1759b631b9d570d77020e5f..bef93a24bedecf44e84f11eccb2d0b62d9280a61 100755 (executable)
@@ -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"