1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Only relabel /var/lib/docker on initial install

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh 2016-02-16 08:27:59 -05:00
parent 48d4e2d953
commit 443ada574d

View file

@ -44,7 +44,7 @@ Conflicts: docker-selinux
# Relabel files # Relabel files
%global relabel_files() \ %global relabel_files() \
/sbin/restorecon -R %{_bindir}/docker %{_localstatedir}/run/docker.sock %{_localstatedir}/run/docker.pid %{_sharedstatedir}/docker %{_sysconfdir}/docker %{_localstatedir}/log/docker %{_localstatedir}/log/lxc %{_localstatedir}/lock/lxc %{_usr}/lib/systemd/system/docker.service /root/.docker &> /dev/null || : \ /sbin/restorecon -R %{_bindir}/docker %{_localstatedir}/run/docker.sock %{_localstatedir}/run/docker.pid %{_sysconfdir}/docker %{_localstatedir}/log/docker %{_localstatedir}/log/lxc %{_localstatedir}/lock/lxc %{_usr}/lib/systemd/system/docker.service /root/.docker &> /dev/null || : \
%description %description
SELinux policy modules for use with Docker SELinux policy modules for use with Docker
@ -83,6 +83,9 @@ fi
if %{_sbindir}/selinuxenabled ; then if %{_sbindir}/selinuxenabled ; then
%{_sbindir}/load_policy %{_sbindir}/load_policy
%relabel_files %relabel_files
if [ $1 -eq 1 ]; then
restorecon -R %{_sharedstatedir}/docker
fi
fi fi
%postun %postun