Github user kkhatua commented on a diff in the pull request: https://github.com/apache/drill/pull/1082#discussion_r166157864 --- Diff: distribution/src/resources/drill-config.sh --- @@ -180,18 +251,61 @@ else fi fi -# Default memory settings if none provided by the environment or +# Execute distrib-setup.sh for any distribution-specific setup (e.g. checks). +# distrib-setup.sh is optional; it is created by some distribution installers +# that need additional distribution-specific setup to be done. +# Because installers will have site-specific steps, the file +# should be moved into the site directory, if the user employs one. + +# Checking if being executed in context of Drillbit and not SQLLine +if [ "$DRILLBIT_CONTEXT" == "1" ]; then + # Check whether to run exclusively distrib-setup.sh OR auto-setup.sh + distribSetup="$DRILL_CONF_DIR/distrib-setup.sh" ; #Site-based distrib-setup.sh + if [ $(checkExecutableLineCount $distribSetup) -eq 0 ]; then --- End diff -- I'd have liked the KISS principle, but I thought there was a need for placeholder `distrib-setup.sh` file. Based on that, I need to figure out whether there is a distribtion-specific setup, or should we revert to executing the `auto-setup.sh`. Unlike sourcing environment files, where an unset variable can be set, for auto-setup, the choice of execution has to be mutually exclusive. This block looks complicated (and verbose with the comments), but is only identifying *what* setup script needs to execute. Hence, all we do here is an assignment of the variables.
---