testsAndMisc/linux_configuration/scripts/periodic_background/digital_wellbeing/lib
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
..
payloads setup_night_lockdown: split into lib/ under the 250-line cap 2026-08-21 15:59:35 +02:00
tests block_compulsive_opening: test the allow/block decision 2026-08-21 15:53:54 +02:00
cco_install.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
cco_report.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
cco_state.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
cco_wrapper.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
leechblock_browsers.sh install_leechblock: first test suite for the split libs 2026-08-21 15:39:15 +02:00
leechblock_config.sh install_leechblock: split into lib/ under the 250-line cap 2026-08-21 15:32:48 +02:00
leechblock_fetch.sh install_leechblock: split into lib/ under the 250-line cap 2026-08-21 15:32:48 +02:00
leechblock_firefox.sh install_leechblock: split into lib/ under the 250-line cap 2026-08-21 15:32:48 +02:00
music_detect.sh Split music_parallelism.sh into an entry script and three libs 2026-08-16 21:50:34 +02:00
music_monitor.sh Split music_parallelism.sh into an entry script and three libs 2026-08-16 21:50:34 +02:00
music_status.sh Split music_parallelism.sh into an entry script and three libs 2026-08-16 21:50:34 +02:00
nl_commands.sh setup_night_lockdown: split into lib/ under the 250-line cap 2026-08-21 15:59:35 +02:00
nl_config.sh setup_night_lockdown: split into lib/ under the 250-line cap 2026-08-21 15:59:35 +02:00
nl_enter.sh setup_night_lockdown: define _NL_PAYLOAD_DIR where it is used 2026-08-21 16:02:59 +02:00
nl_units.sh setup_night_lockdown: split into lib/ under the 250-line cap 2026-08-21 15:59:35 +02:00
nl_unlock.sh setup_night_lockdown: define _NL_PAYLOAD_DIR where it is used 2026-08-21 16:02:59 +02:00