ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject git commit: AMBARI-4101. OS version checking incorrectly reports "centos5" when os is centos 6.5. (Dmytro Shkvyra via odiachenko)
Date Thu, 26 Dec 2013 14:43:18 GMT
Updated Branches:
  refs/heads/branch-1.4.3 3c4fb53c6 -> b550a4bbc


AMBARI-4101. OS version checking incorrectly reports "centos5" when os is centos 6.5. (Dmytro
Shkvyra via odiachenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b550a4bb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b550a4bb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b550a4bb

Branch: refs/heads/branch-1.4.3
Commit: b550a4bbcfe620ebeeb4c34c66425328e450cb36
Parents: 3c4fb53
Author: Oleksandr Diachenko <odiachenko@hortonworks.com>
Authored: Thu Dec 26 16:43:07 2013 +0200
Committer: Oleksandr Diachenko <odiachenko@hortonworks.com>
Committed: Thu Dec 26 16:43:07 2013 +0200

----------------------------------------------------------------------
 ambari-server/src/main/python/os_type_check.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b550a4bb/ambari-server/src/main/python/os_type_check.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/os_type_check.sh b/ambari-server/src/main/python/os_type_check.sh
index 167dfb3..83e64d1 100644
--- a/ambari-server/src/main/python/os_type_check.sh
+++ b/ambari-server/src/main/python/os_type_check.sh
@@ -32,8 +32,8 @@ pattern='[^[:digit:]]*'
 # OS type detection
 if [ -f  "/etc/centos-release" ] 
 then
-  grep -qE "${pattern}6" /etc/centos-release && current_os=$C6
-  grep -qE "${pattern}5" /etc/centos-release && current_os=$C5
+  grep -sqiE "^centos ${pattern}6" /etc/centos-release && current_os=$C6
+  grep -sqiE "^centos ${pattern}5" /etc/centos-release && current_os=$C5
 elif [ -f  "/etc/oracle-release" ] || [ -f  "/etc/ovs-release" ] || [ -f  "/etc/enterprise-release"
] 
 then
   grep -sqE "${pattern}6" /etc/oracle-release || grep -sqE "${pattern}6" /etc/ovs-release
|| \
@@ -43,6 +43,7 @@ then
 elif [ -f  "/etc/redhat-release" ]
 then
   grep -sqiE "^centos ${pattern}5" /etc/redhat-release && current_os=$C5
+  grep -sqiE "^centos ${pattern}6" /etc/redhat-release && current_os=$C6
   grep -sqE "^Red Hat Enterprise Linux ${pattern}6" /etc/redhat-release && current_os=$RH6
   grep -sqE "^Red Hat Enterprise Linux ${pattern}5" /etc/redhat-release && current_os=$RH5
 elif [ -f  "/etc/SuSE-release" ]


Mime
View raw message