From 6561ed2ce8daefe906c3231f3a97fcdb70a29058 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Thu, 16 May 2013 14:33:24 +1200 Subject: [PATCH] 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 --- ...11-selinux-autorelabel => 11-selinux-fixfiles-restore} | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) rename elements/fedora/finalise.d/{11-selinux-autorelabel => 11-selinux-fixfiles-restore} (56%) diff --git a/elements/fedora/finalise.d/11-selinux-autorelabel b/elements/fedora/finalise.d/11-selinux-fixfiles-restore similarity index 56% rename from elements/fedora/finalise.d/11-selinux-autorelabel rename to elements/fedora/finalise.d/11-selinux-fixfiles-restore index 880fdba27..c14ccdf48 100755 --- a/elements/fedora/finalise.d/11-selinux-autorelabel +++ b/elements/fedora/finalise.d/11-selinux-fixfiles-restore @@ -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 " 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 \ No newline at end of file