Page:
Technical_Decomp_Systemd
Pages
Contact Me
Home
Technical_Decomp_Accounts
Technical_Decomp_Cache
Technical_Decomp_Diff
Technical_Decomp_Harvest
Technical_Decomp_Ignore
Technical_Decomp_JinjaTurtle
Technical_Decomp_Manifest
Technical_Decomp_PathFilter
Technical_Decomp_SopsUtil
Technical_Decomp_Systemd
Troubleshooting
enroll single-shot
enroll diff
enroll harvest
enroll manifest
No results
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
enroll/systemd.py
UnitInfo (dataclass)
Purpose: parsed subset of systemctl show for services.
Fields:
- name: unit name
- fragment_path: main unit file path
- dropin_paths: list of drop-in config files
- env_files: resolved EnvironmentFiles entries (minus leading -)
- exec_paths: parsed executable paths from ExecStart
- active_state, sub_state, unit_file_state, condition_result
Lifecycle / where it’s used:
- Returned by get_unit_info().
- harvest.harvest() uses it to:
- infer packages (dpkg_owner on fragment + exec binaries)
- add /etc/... candidates from dropins/env files
UnitQueryError (exception class)
Purpose: a structured error when systemctl show fails for a unit.
Fields set in init:
- unit: unit name that failed
- stderr: trimmed stderr text
Message:
systemctl show failed for :
Lifecycle / where it’s used:
Raised by get_unit_info() if systemctl returns nonzero.
harvest.harvest() catches it and records a ServiceSnapshot with empty packages/files and a note containing the error string.
TimerInfo (dataclass)
Purpose: parsed subset of systemctl show for timers.
Fields:
- name
- fragment_path
- dropin_paths
- env_files
- trigger_unit: parsed from Unit= field (what the timer triggers)
- active_state, sub_state, unit_file_state, condition_result
Lifecycle / where it’s used:
Returned by get_timer_info().
harvest.harvest() uses timers to attribute timer override files under /etc to:
- the triggered service role (preferred), else
- a package role, else
- let it fall through and potentially get captured by etc_custom.