From 1deb36b7a62aec5753216095a921d79e65e03cb5 Mon Sep 17 00:00:00 2001 From: James Hogarth Date: Jan 31 2014 06:49:12 +0000 Subject: added ntp.conf saving and cleanup --- diff --git a/tests/p_ipa-server/0-preclean.sh b/tests/p_ipa-server/0-preclean.sh index bce49d4..6b0e913 100755 --- a/tests/p_ipa-server/0-preclean.sh +++ b/tests/p_ipa-server/0-preclean.sh @@ -37,6 +37,9 @@ cp /etc/nsswitch.conf /tmp/nsswitch.conf.ipa-tests t_Log "Running $0 - Backing up hosts file" cp /etc/hosts /tmp/hosts.ipa-tests +t_Log "Running $0 - Backing up ntp.conf file" +cp /etc/ntp.conf /tmp/ntp.conf.ipa-tests + t_Log "Running $0 - Backing up saving yum history id" /usr/bin/yum history list | awk 'NR == 4 {print $1}' > /tmp/yum-rollback-id.ipa-tests diff --git a/tests/p_ipa-server/99-postclean.sh b/tests/p_ipa-server/99-postclean.sh index 80154ea..8299d43 100755 --- a/tests/p_ipa-server/99-postclean.sh +++ b/tests/p_ipa-server/99-postclean.sh @@ -14,6 +14,9 @@ cp /tmp/nsswitch.conf.ipa-tests /etc/nsswitch.conf t_Log "Running $0 - Restoring hosts file" cp /tmp/hosts.ipa-tests /etc/hosts +t_Log "Running $0 - Restoring ntp.conf file" +cp /tmp/ntp.conf.ipa-tests /etc/ntp.conf + t_Log "Running $0 - Rolling back to yum history id" /usr/bin/yum -y history rollback $(cat /tmp/yum-rollback-id.ipa-tests) &> /dev/null