From d3e3182517e4f8f00e704a9c89399aaca9853655 Mon Sep 17 00:00:00 2001 From: iberezovskiy Date: Wed, 5 Mar 2014 17:58:43 +0400 Subject: [PATCH] Fix DIB_HADOOP_VERSION checks of hadoop-cdh element We shouldn't begin to build image if specified hadoop version is not supported for CDH Change-Id: I592aec1d3d539231db7b2ca421d58b01cd7101de --- elements/hadoop-cdh/post-install.d/40-setup-hadoop | 4 ---- elements/hadoop-cdh/root.d/0-check | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/elements/hadoop-cdh/post-install.d/40-setup-hadoop b/elements/hadoop-cdh/post-install.d/40-setup-hadoop index a8853280..525f1b3e 100755 --- a/elements/hadoop-cdh/post-install.d/40-setup-hadoop +++ b/elements/hadoop-cdh/post-install.d/40-setup-hadoop @@ -10,10 +10,6 @@ if [ "$distro" != "Ubuntu" ]; then exit 1 fi -if [ $DIB_HADOOP_VERSION != "2.0.0-mr1-cdh4.5.0" ]; then - echo "CDH version $DIB_HADOOP_VERSION not supported. Exiting." -fi - echo "Hadoop CDH setup begins for $distro" tmp_dir=/tmp/hadoop diff --git a/elements/hadoop-cdh/root.d/0-check b/elements/hadoop-cdh/root.d/0-check index 8f289ca7..cb2e2624 100755 --- a/elements/hadoop-cdh/root.d/0-check +++ b/elements/hadoop-cdh/root.d/0-check @@ -10,10 +10,7 @@ if [ -z "$DIB_HADOOP_VERSION" ]; then echo "DIB_HADOOP_VERSION is not set. Impossible to install hadoop. Exit" exit 1 fi -version_check=$(echo $DIB_HADOOP_VERSION | sed -e '/[0-9]\.[0-9]\.[0-9]/d') -if [[ -z $version_check ]]; then - echo "All variables are set, continue." -else - echo "Version error. Exit" +if [ $DIB_HADOOP_VERSION != "2.0.0-mr1-cdh4.5.0" ]; then + echo "CDH version $DIB_HADOOP_VERSION not supported. Exiting." exit 1 fi