Skip to content

Commit

Permalink
Merge pull request #19081 from smithfarm/wip-ceph-volume-spec
Browse files Browse the repository at this point in the history
build/ops: rpm: fix systemd macros for ceph-volume@.service

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
  • Loading branch information
tchaikov committed Nov 24, 2017
2 parents a769b82 + d1f2df3 commit 54b528b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -1002,35 +1002,33 @@ rm -rf %{buildroot}
%if 0%{?suse_version}
%fillup_only
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || :
/usr/bin/systemctl preset ceph-disk@\*.service ceph-volume@\*.service ceph.target >/dev/null 2>&1 || :
fi
%endif
%if 0%{?fedora} || 0%{?rhel}
%systemd_post ceph-disk@\*.service ceph.target
%systemd_post ceph-volume@\*.service ceph.target
%systemd_post ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl start ceph.target >/dev/null 2>&1 || :
fi

%preun base
%if 0%{?suse_version}
%service_del_preun ceph-disk@\*.service ceph.target
%service_del_preun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
%if 0%{?fedora} || 0%{?rhel}
%systemd_preun ceph-disk@\*.service ceph.target
%systemd_preun ceph-volume@\*.service ceph.target
%systemd_preun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif

%postun base
/sbin/ldconfig
test -n "$FIRST_ARG" || FIRST_ARG=$1
%if 0%{?suse_version}
DISABLE_RESTART_ON_UPDATE="yes"
%service_del_postun ceph-disk@\*.service ceph.target
%service_del_postun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-disk@\*.service ceph.target
%systemd_postun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
if [ $FIRST_ARG -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
Expand Down

0 comments on commit 54b528b

Please sign in to comment.