|
@@ -278,10 +278,14 @@ if [ -z $arg ] || [ $# -ne 1 ]; then
|
|
|
print_usage
|
|
|
fi
|
|
|
|
|
|
-os=$(uname -s)
|
|
|
-if [[ -n "$HPCC_DEVELOPER" && "$os" = "Linux" && -f "${envfile}" ]] ; then
|
|
|
+thisos=$(uname -s)
|
|
|
+if [[ "$thisos" = "Linux" && -f "${envfile}" && -n "${component}" && \
|
|
|
+ "${DEBUG}" = "NO_DEBUG" && -z "$HPCC_NO_FLOCK" ]] ; then
|
|
|
cfggenpre=(flock ${envfile})
|
|
|
-else
|
|
|
+fi
|
|
|
+
|
|
|
+# verbose output of all shell cmds to .debug file only if -d specified on cmdline
|
|
|
+if [[ "${DEBUG}" != "NO_DEBUG" ]] ; then
|
|
|
log "Debug log written to $LOG_DIR/hpcc-init.debug"
|
|
|
[ -e $LOG_DIR/hpcc-init.debug ] && rm -rf ${LOG_DIR}/hpcc-init.debug
|
|
|
touch ${LOG_DIR}/hpcc-init.debug
|
|
@@ -291,7 +295,7 @@ else
|
|
|
set -x
|
|
|
fi
|
|
|
|
|
|
-if [ -z ${component} ]; then
|
|
|
+if [ -z "${component}" ]; then
|
|
|
for (( i=0; i<=${compListLen}; i++ ));do
|
|
|
component="$component ${compList[$i]}"
|
|
|
done
|