It's intended for use in the ./bin/ scripts which don't use spark-config.sh. I'm not quite sure why they don't, though, I think it would work.

Anyway, I changed the use of "private" variables in this script like FWDIR and SPARK_CONF_DIR to be lower case, following what I imagine is the convention in spark-config.sh.