testsAndMisc/linux_configuration/scripts
Krzysztof kuhy Rudnicki 79a49846b9 setup_night_lockdown: define _NL_PAYLOAD_DIR where it is used
The split referenced $_NL_PAYLOAD_DIR from both install functions but
defined it nowhere, so `setup_night_lockdown.sh setup` would have died
with an unbound variable partway through installing the lockdown. My
earlier scratch verification set the variable by hand, which is exactly
what hid the bug: the emitted artifacts hashed correctly while the real
entry path could not have reached them.

It is now defined in each lib that uses it, eight lines above the use,
via `: "${_NL_PAYLOAD_DIR:=...}"` so an explicit override still wins. A
definition placed in the entry script was silently stripped by an
autoformat pass three times during this work, and a half-run lockdown
installer is not an acceptable failure mode.

Also drops two zero-byte payload files left behind by the .sh -> .sh.in
rename.

Re-verified without presetting anything: install_enter_script and
install_unlock_script emit mode-0755 files hashing 4baaf405... and
eafce28d..., byte-identical to the live /usr/local/bin copies. help and
an unknown command match their baselines; status differs only by the
05:00 countdown ticking 13h to 12h between runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 16:02:59 +02:00
..
boot_recovery Split the Pi flasher and the boot-repair test harness 2026-08-16 20:21:44 +02:00
diagnostics Fix the 11 shellcheck findings that kept CI red since b83ce5d 2026-08-04 20:55:02 +02:00
gaming style: apply prettier formatting to evidence JSON and dwm/gaming READMEs 2026-06-14 07:22:04 +02:00
lib Split scripts/lib/mtk_common.sh with the same entry-point pattern 2026-08-16 21:17:50 +02:00
meta Keep this session's splits shfmt-clean 2026-08-16 22:05:01 +02:00
mtk_root Split mtk_root run_tests.sh: assertions and the dump-test group 2026-08-16 23:02:09 +02:00
periodic_background setup_night_lockdown: define _NL_PAYLOAD_DIR where it is used 2026-08-21 16:02:59 +02:00
single_use generate_study_materials: split into lib/ under the 250-line cap 2026-08-21 14:32:08 +02:00