From 051207da93789d80c830eba2b7e1985317d81d47 Mon Sep 17 00:00:00 2001 From: Hari Shreedharan Date: Thu, 8 Oct 2015 12:16:15 -0700 Subject: [PATCH] SQOOP-2605. Sqoop2: Allow to override location of configuration directory (Jarcec via Hari) --- dist/src/main/bin/sqoop.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dist/src/main/bin/sqoop.sh b/dist/src/main/bin/sqoop.sh index 1bc046f8..71994bd4 100755 --- a/dist/src/main/bin/sqoop.sh +++ b/dist/src/main/bin/sqoop.sh @@ -116,12 +116,17 @@ while [ -h "${PRG}" ]; do fi done +# Default configuration directory is relatively +DEFAULT_SQOOP_CONF_DIR=`dirname $0`/../conf +SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-$DEFAULT_SQOOP_CONF_DIR} +echo "Setting conf dir: $SQOOP_CONF_DIR" + BASEDIR=`dirname ${PRG}` BASEDIR=`cd ${BASEDIR}/..;pwd` SQOOP_IDENT_STRING=${SQOOP_IDENT_STRING:-$USER} SQOOP_PID_DIR=${SQOOP_PID_DIR:-/tmp} sqoop_pidfile="${SQOOP_PID_DIR}/sqoop-${SQOOP_IDENT_STRING}-jetty-server.pid" -JAVA_OPTS="$JAVA_OPTS -Dsqoop.config.dir=`dirname $0`/../conf" +JAVA_OPTS="$JAVA_OPTS -Dsqoop.config.dir=$SQOOP_CONF_DIR" echo "Sqoop home directory: ${BASEDIR}"