Skip to content

Commit

Permalink
Revert "p2v: Disable SELinux in virt-p2v-make-disk."
Browse files Browse the repository at this point in the history
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 25ffcc7.

(cherry picked from commit fcce1f6)
  • Loading branch information
rwmjones committed Aug 8, 2016
1 parent 98fff91 commit ffc6d1c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions p2v/virt-p2v-make-disk.in
Expand Up @@ -149,10 +149,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
"
Expand Down

0 comments on commit ffc6d1c

Please sign in to comment.