mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 21:47:02 +01:00
The previous commit made hosts-blocker's install.sh register the guard-lib instances itself, which is what finally gives a fresh machine real hosts enforcement. It also created a class of machine that --rollback refused to touch: the state dir it demanded, /var/lib/guard-lib-migration, is written by the one-shot migration, and a machine that never had a legacy layer has no such state. So --rollback exited 1 while the instances it exists to remove were live -- every freshly installed machine had no escape hatch at all. Rollback now proceeds whenever a guard-lib instance is registered, says plainly that there is no legacy layer to restore, and still refuses when there is genuinely nothing to roll back. The second half is worse and was only visible by running it. The existing re-assertion of chattr +i works by starting hosts-guard.service and hosts-bind-mount.service, neither of which exists on a fresh machine, so every systemctl cat skipped and the rollback finished with /etc/hosts holding no immutable flag and no bind mount -- less protected than before it ran. It now re-asserts immutability directly when no legacy unit did it. Verified in a pristine vmbox guest whose guards came from install_core_system.sh --all: dry-run and real rollback both exit 0, the three instances are uninstalled, shutdown-schedule (a different feature) is untouched, and /etc/hosts keeps ----i----------------- and all 178410 lines. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp |
||
|---|---|---|
| .. | ||
| lib | ||
| diagnose_arch_performance.sh | ||
| diagnose_pacman_hook_stall.sh | ||
| fix_anki.sh | ||
| fix_arch_performance.sh | ||
| fix_bluetooth.sh | ||
| fix_controller.sh | ||
| fix_flutter_git_env.sh | ||
| fix_stepmania.sh | ||
| fix_systemctl.sh | ||
| fix_thorium.sh | ||
| fix_ubuntu_performance.sh | ||
| fix_virtualbox.sh | ||
| fix_waifu2x.sh | ||
| fix_yay_aur_database.sh | ||
| migrate_hosts_guard_to_guard_lib.sh | ||
| nvidia_troubleshoot.sh | ||
| optimize_arch_desktop.sh | ||