]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/get-os
Fix CentOS detection in regression get-os script
[bacula/bacula] / regress / scripts / get-os
index 8143a6cd8dbf3647ccb0c16ad98ca6c2ec3b69a0..b14b7880227ee2cd276768e8c1e16e766def806a 100755 (executable)
@@ -385,11 +385,11 @@ then
        DISTNAME=redhat
 elif test -f /etc/redhat-release
 then
-       if test `grep CentOs /etc/redhat-release`
+       if grep -q CentOS /etc/redhat-release
        then
-           DISTNAME=redhat
-       else
            DISTNAME=centos
+       else
+           DISTNAME=redhat
        fi
 elif test -f /etc/gentoo-release
 then
@@ -468,8 +468,7 @@ redhat)
         fi
         if test `cat $f | grep release |\
                    cut -f 3 -d ' '`x = "Enterprise"x ; then
-           DISTVER="Enterprise "`cat $f | grep release |\
-                    cut -f 6 -d ' '`
+           DISTVER="RHEL "`cat $f | grep release | cut -f 6 -d ' '`
         else
             DISTVER=`cat /etc/redhat-release | grep release |\
                      cut -f 5 -d ' '`