ipatests: Fix incorrect order of operations when restoring backup

When restoring files from backup, we do use an incorrect order of
operations - we first restore SELinux context and then copy the
files from backup, when we need to do the exact opposite.

https://fedorahosted.org/freeipa/ticket/4133

Reviewed-By: Jan Pazdziora <jpazdziora@redhat.com>
This commit is contained in:
Tomas Babej
2014-02-19 16:31:12 +01:00
committed by Petr Viktorin
parent 792c3f9c8c
commit bc0872cc0b

View File

@@ -137,7 +137,7 @@ def restore_files(host):
# Run both commands in one session. For more information, see:
# https://fedorahosted.org/freeipa/ticket/4133
host.run_command('%s ; (%s ||:)' % (restorecon_command, copyfiles_command))
host.run_command('%s ; (%s ||:)' % (copyfiles_command, restorecon_command))
# Remove all the files that did not exist and were 'backed up'
host.run_command(['xargs', '-d', r'\n', '-a', rmname, 'rm', '-vf'],