summaryrefslogtreecommitdiff
path: root/functions/defaults.sh
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-03-28 03:31:15 +0000
committerLyndon Brown <jnqnfe@gmail.com>2020-04-23 11:52:13 +0100
commit673b8116279d4899eb3eb9a03d3abeed1926072c (patch)
tree0b2618b05a05f18ec2419cc0fc092d7e34870c47 /functions/defaults.sh
parent9abdf31d9f97d3491532499b2f74177526636ba5 (diff)
downloadvyos-live-build-673b8116279d4899eb3eb9a03d3abeed1926072c.tar.gz
vyos-live-build-673b8116279d4899eb3eb9a03d3abeed1926072c.zip
config: support both comma and space separated to-cache stages
Diffstat (limited to 'functions/defaults.sh')
-rwxr-xr-xfunctions/defaults.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 85efca7df..02339aa4e 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -159,6 +159,7 @@ Set_config_defaults ()
LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES:-true}"
LB_CACHE_STAGES="${LB_CACHE_STAGES:-bootstrap}"
fi
+ LB_CACHE_STAGES="$(echo "${LB_CACHE_STAGES}" | tr "," " ")"
# Setting debconf frontend
LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND:-noninteractive}"
@@ -596,7 +597,7 @@ Check_config_defaults ()
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
# d-i true, no caching
- if ! echo ${LB_CACHE_STAGES} | grep -qs "bootstrap\b" || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]
+ if ! In_list "bootstrap" ${LB_CACHE_STAGES} || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]
then
Echo_warning "You have selected values of LB_CACHE, LB_CACHE_PACKAGES, LB_CACHE_STAGES and LB_DEBIAN_INSTALLER which will result in 'bootstrap' packages not being cached. This configuration is potentially unsafe as the bootstrap packages are re-used when integrating the Debian Installer."
fi