From a32aa6b351064f17779adcd8e89ebc0e98fc3096 Mon Sep 17 00:00:00 2001 From: KarthikTunga Date: Wed, 16 Oct 2013 22:51:09 -0700 Subject: Implementing --config argument in the scripts --- bin/slaves.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin/slaves.sh') diff --git a/bin/slaves.sh b/bin/slaves.sh index bcb7760130..aeb0c0f6be 100755 --- a/bin/slaves.sh +++ b/bin/slaves.sh @@ -28,7 +28,7 @@ # SPARK_SSH_OPTS Options passed to ssh when running remote commands. ## -usage="Usage: slaves.sh [--config confdir] command..." +usage="Usage: slaves.sh [--config ] command..." # if no args specified, show usage if [ $# -le 0 ]; then @@ -46,14 +46,15 @@ bin=`cd "$bin"; pwd` # spark-env.sh. Save it here. HOSTLIST=$SPARK_SLAVES -#check if conf dir passed as an argument +# Check if --config is passed as an argument. It is an optional parameter. +# Exit if the argument is a directory. if [ "$1" == "--config" ] then shift conf_dir=$1 if [ ! -d "$conf_dir" ] then - echo "$conf_dir is not a valid directory" + echo "ERROR : $conf_dir is not a directory" echo $usage exit 1 else -- cgit v1.2.3