]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: Fix up (/var)/run/ceph creation 5980/head
authorBoris Ranto <branto@redhat.com>
Fri, 18 Sep 2015 15:00:30 +0000 (17:00 +0200)
committerSage Weil <sage@redhat.com>
Fri, 18 Sep 2015 15:02:46 +0000 (11:02 -0400)
Fixes: #13059
Signed-off-by: Boris Ranto <branto@redhat.com>
ceph.spec.in

index 667ee11b842394a72374af97a6e0873271f5ed58..45f40b881de8cb3bbb0ddb39191244d5d9be4900 100644 (file)
@@ -637,7 +637,7 @@ mv $RPM_BUILD_ROOT/sbin/mount.fuse.ceph $RPM_BUILD_ROOT/usr/sbin/mount.fuse.ceph
 
 #set up placeholder directories
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ceph
-%if  (! 0%{?suse_version}) || ( 0%{?suse_version} && (! 0%{?_with_systemd}) )
+%if ! 0%{?_with_systemd}
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/ceph
 %endif
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ceph
@@ -673,13 +673,13 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/ldconfig
 %if 0%{?_with_systemd}
+  systemd-tmpfiles --create
   %if 0%{?suse_version}
     %service_add_post ceph.target
   %endif
 %else
   /sbin/chkconfig --add ceph
 %endif
-mkdir -p %{_localstatedir}/run/ceph/
 
 %preun
 %if 0%{?_with_systemd}
@@ -818,7 +818,9 @@ mkdir -p %{_localstatedir}/run/ceph/
 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
+%if ! 0%{?_with_systemd}
 %attr(770,ceph,ceph) %dir %{_localstatedir}/run/ceph
+%endif
 
 #################################################################################
 %files -n ceph-common