]> xenbits.xensource.com Git - raisin.git/commitdiff
Handle unsupported distros with a prettier message
authorDoug Goldstein <cardoe@cardoe.com>
Fri, 13 Nov 2015 04:08:03 +0000 (22:08 -0600)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 13 Nov 2015 10:32:21 +0000 (10:32 +0000)
Handle unknown distros by saying "unknown" instead of an empty string
and for Gentoo users actually mention it.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
lib/common-functions.sh

index 27f64349722d06970f5fe8efa1df05e5b1a41d40..19434c2024741eca0208c13210dbd1bb7ee0c7ac 100644 (file)
@@ -98,6 +98,8 @@ function get_tests() {
 }
 
 function get_distro() {
+    os_VENDOR="unknown"
+
     if [[ -x "`which lsb_release 2>/dev/null`" ]]
     then
         os_VENDOR=`lsb_release -i -s`
@@ -150,6 +152,9 @@ function get_distro() {
                      sed -r 's/\"|\(|\)//g' | awk '{print $2}'`
         os_RELEASE=`awk '/VERSION_ID=/' /etc/os-release | sed 's/VERSION_ID=//' \
                     | sed 's/\"//g'`
+    elif [[ -f /etc/gentoo-release ]]
+    then
+        os_VENDOR="Gentoo"
     fi
 
     # Simply distro version string