[docker-io] el6 preun postun changes
Lokesh Mandvekar
lsm5 at fedoraproject.org
Wed Nov 27 22:04:28 UTC 2013
commit 38aab8d406ab0fe77f4662e7ef2d323c53d5f20f
Author: Lokesh Mandvekar <lsm5 at redhat.com>
Date: Wed Nov 27 15:57:02 2013 -0600
el6 preun postun changes
Signed-off-by: Lokesh Mandvekar <lsm5 at redhat.com>
docker-io.spec | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/docker-io.spec b/docker-io.spec
index 0eea6c3..a82b023 100644
--- a/docker-io.spec
+++ b/docker-io.spec
@@ -14,7 +14,7 @@
Name: docker-io
Version: 0.7.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
@@ -42,8 +42,9 @@ BuildRequires: python-sphinxcontrib-httpdomain
BuildRequires: pkgconfig(systemd)
Requires: systemd-units
%else
-Requires(post): chkconfig
-Requires(preun): chkconfig
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(postun): initscripts
%endif
Requires: lxc
Requires: tar
@@ -130,14 +131,18 @@ exit 0
%preun
%if %{with systemd}
%systemd_preun %{SOURCE1}
+%else
+/sbin/service docker stop >/dev/null 2>&1
+/sbin/chkconfig --del docker
%endif
%postun
%if %{with systemd}
%systemd_postun_with_restart %{SOURCE1}
%else
-%{_initrddir}/docker stop >/dev/null 2>&1
-/sbin/chkconfig --del docker
+if [ "$1" -ge "1" ] ; then
+ /sbin/service docker condrestart >/dev/null 2>&1 || :
+fi
%endif
%files
@@ -159,6 +164,9 @@ exit 0
%dir %{_sharedstatedir}/docker
%changelog
+* Wed Nov 27 2013 Adam Miller <maxamillion at fedoraproject.org> - 0.7.0-5
+- Fix up EL6 preun/postun to not fail on postun scripts
+
* Wed Nov 27 2013 Lokesh Mandvekar <lsm5 at redhat.com> - 0.7.0-4
- brctl patch for rhel <= 7
More information about the scm-commits
mailing list