summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-05-04 16:16:00 +0100
committerLyndon Brown <jnqnfe@gmail.com>2020-05-04 16:16:00 +0100
commit9d7393bbdbec133dedbc5c084a2596de227e04cf (patch)
tree03faa430867b395b6cd04f21ed0d4561f0f10a7a
parent89ed6a54a10ba3b4ce781d8e1805f099b77cb7be (diff)
downloadvyos-live-build-9d7393bbdbec133dedbc5c084a2596de227e04cf.tar.gz
vyos-live-build-9d7393bbdbec133dedbc5c084a2596de227e04cf.zip
config: add note
The core purpose of `Prepare_config()` is to prepare the config by setting defaults where not specified. It should not be involved itself in validation of user options. This can be an important distinction, for instance in `clean` where we use this function, but avoid validation to potentially allow for an option that deletes the config, that should work even in the face of an invalid config. Gbp-Dch: Ignore
-rwxr-xr-xfunctions/configuration.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/functions/configuration.sh b/functions/configuration.sh
index b92b79110..6b5cfdc63 100755
--- a/functions/configuration.sh
+++ b/functions/configuration.sh
@@ -10,6 +10,9 @@
# Prepare config for use, filling in defaults where no value provided for instance
+#
+# This function should avoid performing validation checks and failing from invalid values.
+# Validation should be done through `Validate_config()`.
Prepare_config ()
{
# Colouring is re-evaluated here just incase a hard coded override was given in the saved config