4 Commits

Author SHA1 Message Date
John McCardle
1e1b00f45d Additional userdb carefulness
see #1

Bug 1 fixed — revert_userdb blindly reloaded userdbd (30-userdb.sh): During --revert, analyze_userdb is never called so DM_NAME is always "unknown". The unconditional userdbd reload would break the lock screen again for users reverting while SDDM was active. Now it detects the active DM directly and skips the reload with a warning if one is found.

Bug 2 fixed — revert_no_conf printed rm -rf /etc/userdb (99-main.sh): The legacy manual-revert instructions nuked all of /etc/userdb, including any pre-existing records that ageless had backed up. Now it prints per-file commands: mv *.pre-ageless where a backup exists, rm only where there's no backup.
2026-04-27 15:16:23 -04:00
John McCardle
fd430934ad fix ID_LIKE string safety
closes #5 - thanks to @shadypayload for reporting

**Root cause:** Line 138's `ID_LIKE=${AGELESS_ID_LIKE}` in a heredoc wrote `ID_LIKE=ubuntu debian` (unquoted) to `/etc/os-release`. Any script that sources the file as shell — including `grub-mkconfig` — then tried to execute `debian` as a command.

**Changes made (v0.1.0 → 0.1.1):**
- `become-ageless.sh:138` — `ID_LIKE="${AGELESS_ID_LIKE}"` (the actual bug)
- `become-ageless.sh:136` — `VERSION_CODENAME="${AGELESS_CODENAME,,}"` (unquoted, low-risk but same pattern)
- `become-ageless.sh:161-162` — same fix in the `/etc/lsb-release` heredoc
- Copied updated script to `agelesslinux.org/`
2026-04-27 11:07:11 -04:00
John McCardle
1b508f241c broaden lock screen warning from SDDM-only to all display managers
Linux Mint (LightDM) also confirmed affected by the lock screen bug.
The issue is nss-systemd reading /etc/userdb/ drop-ins, not specific
to any display manager. Rename print_sddm_warning to print_dm_warning,
trigger warning for any detected DM when userdb will be modified.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 23:16:55 -04:00
John McCardle
c41873ccac modular restructure, systemd gating, version 0.1.0
Decompose become-ageless.sh into lib/ modules assembled by build.sh:
  00-header.sh    — colors, version, utilities
  10-os-release.sh — os-release + lsb-release
  20-compliance.sh — /etc/ageless/ content
  30-userdb.sh    — userdb birthDate neutralization
  40-agelessd.sh  — persistent daemon
  50-conf.sh      — agelesslinux.conf
  99-main.sh      — arg parsing, presentation, orchestration

Each module defines analyze/plan/execute/revert/summary functions.
main() reads as a flowchart. §§ markers are searchable in the
assembled file. Individual modules are sourceable for debugging.

Gate userdb neutralization on systemd-userdbd presence — skip
cleanly on runit/non-systemd systems. Error on --persistent
without systemd.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:55:25 -04:00