mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
committed by
Petr Viktorin
parent
792c3f9c8c
commit
bc0872cc0b
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user