]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
logrotate.conf: prefer service over invoke-rc.d 4426/head
authorSage Weil <sage@redhat.com>
Tue, 21 Apr 2015 23:08:09 +0000 (16:08 -0700)
committerSage Weil <sage@redhat.com>
Tue, 21 Apr 2015 23:08:09 +0000 (16:08 -0700)
On trusty 14.04, service works but invoke-rc.d does not (but is present).

Fixes: #11330
Reported-by: Wim Heirman <wim@heirman.net>
Signed-off-by: Sage Weil <sage@redhat.com>
src/logrotate.conf
src/rgw/logrotate.conf

index 1833d55cfd73fb1f5d6b372e2956e10fd308bb58..9ae27baee45e1c8b5c6b3ae3ad22b1329f1ddbe7 100644 (file)
@@ -4,10 +4,10 @@
     compress
     sharedscripts
     postrotate
-        if which invoke-rc.d > /dev/null 2>&1 && [ -x `which invoke-rc.d` ]; then
-            invoke-rc.d ceph reload >/dev/null
-        elif which service > /dev/null 2>&1 && [ -x `which service` ]; then
+        if which service > /dev/null 2>&1 && [ -x `which service` ]; then
             service ceph reload >/dev/null
+        elif which invoke-rc.d > /dev/null 2>&1 && [ -x `which invoke-rc.d` ]; then
+            invoke-rc.d ceph reload >/dev/null
         fi
         # Possibly reload twice, but depending on ceph.conf the reload above may be a no-op
         if which initctl > /dev/null 2>&1 && [ -x `which initctl` ]; then
index 7e527e852d7f3eafd914d54aafe695b1ae9fd163..6cdfd13c251fbbf0c5171e550766e5444c61e674 100644 (file)
@@ -4,10 +4,10 @@
     compress
     sharedscripts
     postrotate
-        if which invoke-rc.d > /dev/null 2>&1 && [ -x `which invoke-rc.d` ]; then
-            invoke-rc.d radosgw reload >/dev/null
-        elif which service > /dev/null 2>&1 && [ -x `which service` ]; then
+        if which service > /dev/null 2>&1 && [ -x `which service` ]; then
             service ceph-radosgw reload >/dev/null
+        elif which invoke-rc.d > /dev/null 2>&1 && [ -x `which invoke-rc.d` ]; then
+            invoke-rc.d radosgw reload >/dev/null
         fi
         # Possibly reload twice, but depending on ceph.conf the reload above may be a no-op
         if which initctl > /dev/null 2>&1 && [ -x `which initctl` ]; then