From d03e0c0f901866b593f2fff7298fc6f8259dd35b Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Jun 29 2014 13:31:37 +0000 Subject: Fixed the ipa-server test to also clean up the /etc/ssh/ssh_config (breaking the p_openssh test on c7 - https://fedorahosted.org/sssd/ticket/1498) --- diff --git a/tests/p_ipa-server/0-preclean.sh b/tests/p_ipa-server/0-preclean.sh index 2bfca66..3477f86 100755 --- a/tests/p_ipa-server/0-preclean.sh +++ b/tests/p_ipa-server/0-preclean.sh @@ -56,6 +56,9 @@ if (t_GetPkgRel basesystem | grep -qE 'el(6|7)') yum remove -d0 -y tomcat ipa-server >/dev/null 2>&1 /bin/rm -Rf /var/lib/pki/pki-tomcat/ /etc/sysconfig/pki-tomcat /var/log/pki/pki-tomcat /etc/pki/pki-tomcat /etc/sysconfig/pki/tomcat/pki-tomcat + t_Log "Running $0 - Backing up ssh_config" + cp /etc/ssh/ssh_config /etc/ssh/ssh_config.ipa-tests + else echo "Skipped on CentOS 5" fi diff --git a/tests/p_ipa-server/99-postclean.sh b/tests/p_ipa-server/99-postclean.sh index ce77b3f..1ba0b4a 100755 --- a/tests/p_ipa-server/99-postclean.sh +++ b/tests/p_ipa-server/99-postclean.sh @@ -6,23 +6,27 @@ if (t_GetPkgRel basesystem | grep -qE 'el(6|7)') then t_Log "Running $0 - Restoring up resolv.conf" - cp /tmp/resolv.conf.ipa-tests /etc/resolv.conf + /usr/bin/cp /tmp/resolv.conf.ipa-tests /etc/resolv.conf t_Log "Running $0 - Restoring nsswitch.conf" - cp /tmp/nsswitch.conf.ipa-tests /etc/nsswitch.conf + /usr/bin/cp /tmp/nsswitch.conf.ipa-tests /etc/nsswitch.conf t_Log "Running $0 - Restoring hosts file" - cp /tmp/hosts.ipa-tests /etc/hosts + /usr/bin/cp /tmp/hosts.ipa-tests /etc/hosts if [[ -f /tmp/ntp.conf.ipa-tests ]] then t_Log "Running $0 - Restoring ntp.conf file" - cp /tmp/ntp.conf.ipa-tests /etc/ntp.conf + /usr/bin/cp /tmp/ntp.conf.ipa-tests /etc/ntp.conf fi t_Log "Running $0 - Rolling back to yum history id - this will take some time" /usr/bin/yum -y history rollback $(cat /tmp/yum-rollback-id.ipa-tests) &> /dev/null + t_Log "Running $0 - Restoring ssh_config" + /usr/bin/cp /etc/ssh/ssh_config.ipa-tests /etc/ssh/ssh_config + + rm -f /tmp/*.ipa-test /etc/httpd/conf.d/* if [ "$centos_ver" = "7" ] ; then