[PATCH 1/2] Continue post-installation steps even if writing NTP configuration fails
Vratislav Podzimek
vpodzime at redhat.com
Thu Aug 30 06:57:24 UTC 2012
Writing NTP configuration is not so important that it should stop the
post-installation steps. Warning in the log should be more appropriate.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/kickstart.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 9d667c2..ea45b72 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1265,8 +1265,11 @@ class Timezone(commands.timezone.F18_Timezone):
# write out NTP configuration (if set)
if not self.nontp and self.ntpservers:
chronyd_conf_path = os.path.normpath(ROOT_PATH + ntp.NTP_CONFIG_FILE)
- ntp.save_servers_to_config(self.ntpservers,
- conf_file_path=chronyd_conf_path)
+ try:
+ ntp.save_servers_to_config(self.ntpservers,
+ conf_file_path=chronyd_conf_path)
+ except ntp.NTPconfigError as ntperr:
+ log.warning("Failed to save NTP configuration: %s" % ntperr)
class User(commands.user.F12_User):
def execute(self, storage, ksdata, instClass, users):
--
1.7.11.4
More information about the anaconda-patches
mailing list