|
From: <sv...@va...> - 2014-09-06 17:38:06
|
Author: mjw Date: Sat Sep 6 17:37:55 2014 New Revision: 14482 Log: 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. Modified: trunk/nightly/bin/nightly Modified: trunk/nightly/bin/nightly ============================================================================== --- trunk/nightly/bin/nightly (original) +++ trunk/nightly/bin/nightly Sat Sep 6 17:37:55 2014 @@ -222,7 +222,11 @@ 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" |