chore(cleanup): retire two stale leftovers from the lazy-load + subdomain work

initilize_files.sh's load-comment said "Phase 6 will tackle this with a
precompiled cache file" — but Phase 6 deliberately shipped a different
(simpler) win, and Phase 7 was reconsidered and rejected (the ~30 ms
saving doesn't justify the invalidation complexity across every CFG
write site). Rewrite the comment to describe current behaviour: the two
config scans run because bash can't lazy-load variables, and the
precompile was looked at and dropped.

app_generate.sh had a `read -p "" host_name` inside a `while true` with
no break — anyone who actually ran `libreportal app generate` would
have hung at the hostname prompt forever. The value was then fed into
a `sed 's/HOST_NAME=test/HOST_NAME='"$host_name"'/g'` against the new
app's .config file, but the post-2e4f420 template no longer carries
HOST_NAME=test (per-port subdomains in the PORT row drive routing now).
So the prompt was infinite-looping to gather a value that fed a no-op
sed. Drop both — the function loses no real capability since the
subdomain field is set per-port via the standard PORT row.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
librelad 2026-05-26 23:42:12 +01:00
parent 44486f6de3
commit 9ffc8e4924
2 changed files with 5 additions and 10 deletions

View File

@ -35,11 +35,6 @@ appGenerate()
echo ""
done
while true; do
isQuestion "Please enter the hostname (e.g., a hostname 'test' would set up the domain: test.yourdomain.com): "
read -p "" host_name
done
while true; do
isQuestion "Please enter a short description (e.g a Finance Mananger): "
read -p "" app_description
@ -106,8 +101,6 @@ appGenerate()
checkSuccess "Update $app_name.config - all cases of template to $app_name"
local result=$(runInstallOp sed -i '' -e 's/TEMPLATE/'"$full_caps_app_name"'/g' "$app_config_file" > /dev/null 2>&1)
checkSuccess "Update $app_name.config - all cases of TEMPLATE to $full_caps_app_name"
local result=$(runInstallOp sed -i '' -e 's/HOST_NAME=test/HOST_NAME='"$host_name"'/g' "$app_config_file" > /dev/null 2>&1)
checkSuccess "Updating Config - HOST_NAME to $app_name"
while true; do
echo ""

View File

@ -140,9 +140,11 @@ sourceInitilize()
#
# Under LP_LAZY=1 with a present manifest, the container scan is replaced
# by autoload stubs in function_manifest.sh — sourcing every container
# installer eagerly would defeat the lazy optimisation. The two config
# scans still run because bash can't lazy-load variables (Phase 6 will
# tackle this with a precompiled cache file).
# installer eagerly would defeat the lazy optimisation. Both config scans
# still run because bash can't lazy-load variables; precompiling them was
# considered (Phase 7) and rejected — the ~30 ms saving doesn't justify
# the invalidation complexity (updateConfigOption writes happen across
# many code paths).
sourceScanFiles "libreportal_configs";
sourceScanFiles "app_configs";
if [[ "$LP_LAZY" == "1" ]] && declare -p LP_FN_MAP >/dev/null 2>&1; then