From c7f3c746ccfd74480064dbe73fbc754548c30927 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 14 Jan 2008 12:43:26 -0500 Subject: 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 --- ipa-server/ipaserver/service.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipa-server/ipaserver/service.py') diff --git a/ipa-server/ipaserver/service.py b/ipa-server/ipaserver/service.py index f6df6e5b..0ea3f661 100644 --- a/ipa-server/ipaserver/service.py +++ b/ipa-server/ipaserver/service.py @@ -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) -- cgit