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
This commit is contained in:
Steve Baker 2013-05-16 14:33:24 +12:00
parent 7e0fe78cf2
commit 6561ed2ce8

View File

@ -1,6 +1,12 @@
#!/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
touch /.autorelabel
setfiles /etc/selinux/targeted/contexts/files/file_contexts /
FIXFILES_LOG=$(mktemp)
fixfiles -l $FIXFILES_LOG restore
cat $FIXFILES_LOG
rm $FIXFILES_LOG