From fcce1f694e46933dd5d6a0ef1369cef3c5152fc5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 21 Jul 2016 22:29:05 +0100 Subject: [PATCH] Revert "p2v: Disable SELinux in virt-p2v-make-disk." The commit claimed that SELinux was disabled in the virt-p2v-make-kickstart script, and so this was just making things consistent. However this is not true. SELinux *is* enabled in the kickstart version. There is some code to disable it, but it is commented out (admittedly it's hard to tell because the code is buried in a multi-line sed expression). The commit message also claimed (this time correctly) that the '--selinux-relabel' step caused an extra reboot each time virt-p2v is run from the ISO. However we have recently fixed this so it can usually do the relabelling during the build, not at boot time, so this is no longer a problem. This reverts commit 25ffcc7d436cd8f6bcf29d8bde5efd4b8823d6cc. --- p2v/virt-p2v-make-disk.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/p2v/virt-p2v-make-disk.in b/p2v/virt-p2v-make-disk.in index 690d0dd0b..eeaa3b79a 100644 --- a/p2v/virt-p2v-make-disk.in +++ b/p2v/virt-p2v-make-disk.in @@ -170,10 +170,9 @@ EOF latest_version="$(cd /lib/modules; ls -1vr | head -1)" dracut -f --kver $latest_version EOF - # Double quotes because we want $tmpdir to be expanded. - # Disable SELinux for consistency with virt-p2v-make-kickstart. + # Double quotes because we want $tmpdir to be expanded: extra_args=" - --edit /etc/selinux/config:s/^SELINUX=.*/SELINUX=disabled/g + --selinux-relabel --upload $tmpdir/p2v.conf:/etc/dracut.conf.d/ --run $tmpdir/post-install "