Federico Simoncelli has uploaded a new change for review.
Change subject: spec: use the fedora systemd macros
......................................................................
spec: use the fedora systemd macros
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=850412
Change-Id: I76857a6b9ae1a945511f359333735b9497c5e2b0
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/85/12285/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 38838ea..e9289a7 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -528,12 +528,16 @@
/sbin/chkconfig --add vdsm-restore-net-config
fi
%else
+%if 0%{?fedora} >= 18
+%systemd_post vdsmd.service
+%else
if [ "$1" -eq 1 ] ; then
/bin/systemctl enable vdsmd.service >/dev/null 2>&1 || :
/bin/systemctl enable vdsm-restore-net-config.service >/dev/null 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
exit 0
+%endif
%endif
%preun
@@ -574,12 +578,16 @@
fi
fi
%else
+%if 0%{?fedora} >= 18
+%systemd_preun vdsmd.service
+%else
if [ "$1" -eq 0 ]; then
/bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload disable vdsm-restore-net-config.service > /dev/null
2>&1 || :
/bin/systemctl stop vdsmd.service > /dev/null 2>&1 || :
fi
exit 0
+%endif
%endif
%postun
@@ -589,11 +597,15 @@
fi
exit 0
%else
+%if 0%{?fedora} >= 18
+%systemd_postun_with_restart vdsmd.service
+%else
if [ "$1" -ge 1 ] ; then
/bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || :
fi
exit 0
%endif
+%endif
%if 0%{?rhel}
%triggerun -- libvirt
--
To view, visit
http://gerrit.ovirt.org/12285
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I76857a6b9ae1a945511f359333735b9497c5e2b0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>