mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 20:07:04 +01:00
Five live mechanisms were silently pointing at paths that no longer exist.
None of them announced it; each degraded to a log line or a missing file.
- hosts-file-monitor.service is ACTIVE and watches /etc/hosts for tampering,
but its embedded installer path was the pre-flatten scripts/ one. It logged
"Hosts install script not found" 37 times: it detected tampering it could
not repair.
- dns-blocklist-refresh.service (enabled, next run 00:01) named a deleted
single_use/features/ path, as did media-organizer.service under utils/.
- setup_periodic_system.sh read all TEN of its templates from
periodic_background/system-maintenance/, which has held nothing but
untracked .pyc and .coverage residue since system-maintenance was
extracted. Every install of a service, timer or script was reading a file
that was not there.
- /etc/sudoers.d/hosts-install-no-passwd granted NOPASSWD on the old hosts
installer path.
Running the fixed dns unit then caught a bug the static checks missed: under
systemd there is no SUDO_USER and `id -un` is root, so the new resolver
returned /root/hosts-blocker and the service died with "Feed generator not
found". extracted_repo_home() now handles the bare-root case by falling back
to the owner of the lib file itself. Verified across all four invocation
modes: as the user, via sudo, as root with SUDO_USER unset, and with an
explicit *_DIR override.
The service now reports "Feed refreshed and dnsmasq reloaded (189038 lines)".
/etc/hosts is untouched throughout -- still 176888 lines, still chattr +i,
still bind-mounted by its guard.
Live artifacts were patched via validated temp files, never in-place: the
sudoers drop-in was checked with `visudo -cf` before install, and every
original is backed up under /var/tmp/*.pre-{extract,fix}.
Stale live references: 8 -> 2. The 2 that remain name digital_wellbeing
paths and can only be fixed when that unit is extracted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
|
||
|---|---|---|
| .. | ||
| tests | ||
| android.sh | ||
| common_datetime.sh | ||
| common_packages.sh | ||
| common_services.sh | ||
| common.sh | ||
| extracted_repos.sh | ||