diskimage-builder/elements/fedora/finalise.d/11-selinux-fixfiles-restore
Steve Baker 6561ed2ce8 Run fixfiles restore in chroot instead of firstboot.
Boot time was 30 seconds shorter in an all-in-one devstack
environment.

Thanks to Ghe Rivero for a pointer to the solution
https://bugzilla.redhat.com/show_bug.cgi?id=208275

Change-Id: I90d0c96d5659326ba67d6119b96d9a4113adf7fe
2013-05-16 15:23:58 +12:00

12 lines
371 B
Bash
Executable File

#!/bin/bash
set -x
# Without fixing selinux file labels, sshd will run in the kernel_t domain
# instead of the sshd_t domain, making ssh connections fail with
# "Unable to get valid context for <user>" error message
setfiles /etc/selinux/targeted/contexts/files/file_contexts /
FIXFILES_LOG=$(mktemp)
fixfiles -l $FIXFILES_LOG restore
cat $FIXFILES_LOG
rm $FIXFILES_LOG