-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
installer: add a naive systemd service state backup and restore
Add support for backing up and restoring explicitly disabled and enabled services by checking their symlinks and restoring or removing them when applying the backup. It does naive enabled/disabled services heuristic: - if the .preset does not say enabled, and there is a symlink in multi-user.target.wants, recreate the symink on restore - if the .preset says enabled, and there was no symlink in multi-user.target.wants, remove the symlink on restore Additionally, it only checks certain services: - Skip any oneshot services (these are expected to be disabled with enabled preset after first boot) - Skip any services not targeting multi-user It does support parameterized services though, as supported by frr (via frr@something). This allows e.g. docker to continue to be enabled after an update to a newer version. It should now also keep the choice of baseboxd vs ryu on upgrade (untested though). Signed-off-by: Jonas Gorski <[email protected]>
- Loading branch information
1 parent
6944d7f
commit 8bc762f
Showing
1 changed file
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters