mike-jumper commented on code in PR #979:
URL: https://github.com/apache/guacamole-client/pull/979#discussion_r1580150596


##########
guacamole-docker/entrypoint.d/700-configure-features.sh:
##########
@@ -0,0 +1,88 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+##
+## @fn 800-configure-features.sh
+##
+## Automatically checks all environment variables currently set and performs
+## configuration tasks related to those variabels, including installing any
+## extensions ane external libraries associated with those variables to
+## GUACAMOLE_HOME.  Only environment variable prefixes are considered; this
+## script is not aware of whether an extension actually uses an environment
+## variable.
+##
+
+##
+## Returns whether the feature associated with a particular environment
+## variable prefix has configuration values set. Only the presence of
+## environment variables having that prefix is checked. Features can also be
+## entirely enabled/disabled through setting the [PREFIX]_ENABLED variable to
+## true/false respectively, where "[PREFIX]" is the specified environment
+## variable prefix.
+##
+## @param VAR_BASE
+##     The environment variable prefix to check.
+##
+## @returns
+##     Zero if the feature associated with the given environment variable
+##     prefix is enabled, non-zero otherwise.
+##
+is_feature_enabled() {
+
+    local VAR_BASE="$1"
+
+    # Allow any feature to be explicitly enabled/disabled using a
+    # [PREFIX]_ENABLED variable
+    local ENABLED_VAR="${VAR_BASE}ENABLED"

Review Comment:
   Sure - I think I can clarify this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to