mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Backup system state in ipa-server-install
This patch adds a sysrestore module which allows ipa-server-install code to backup any system state so that it can be restored again with e.g. ipa-server-install --uninstall. The idea is that any files ipa-server-install modifies gets backed up to /var/cache/ipa/sysrestore/ while any "meta" state, like whether a service is enabled with chkconfig, is saved to /var/cache/ipa/sysrestore.state. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#
|
||||
|
||||
import logging, sys
|
||||
import sysrestore
|
||||
from ipa import ipautil
|
||||
|
||||
|
||||
@@ -100,6 +101,9 @@ class Service:
|
||||
def is_enabled(self):
|
||||
return is_enabled(self.service_name)
|
||||
|
||||
def backup_state(self, key, value):
|
||||
sysrestore.backup_state(self.service_name, key, value)
|
||||
|
||||
def print_msg(self, message):
|
||||
print_msg(message, self.output_fd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user