]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw: create /var/log/radosgw in package, not init script
authorSage Weil <sage@inktank.com>
Tue, 15 Oct 2013 21:27:35 +0000 (14:27 -0700)
committerSage Weil <sage@inktank.com>
Wed, 16 Oct 2013 23:16:16 +0000 (16:16 -0700)
Fixes: #6475
Signed-off-by: Sage Weil <sage@inktank.com>
ceph.spec.in
debian/radosgw.dirs
src/init-radosgw
src/init-radosgw.sysv

index ee4b84ef090df23a0224e504fd19283f631256f0..d6cc6309d8cd3afc9675eff44fc4cabab707e7ab 100644 (file)
@@ -365,7 +365,7 @@ fi
 %endif
 # Package removal cleanup
 if [ "$1" -eq "0" ] ; then
-    rm -rf /var/log/ceph 
+    rm -rf /var/log/ceph
     rm -rf /etc/ceph
 fi
 
@@ -516,6 +516,7 @@ fi
 %{_mandir}/man8/radosgw.8*
 %{_mandir}/man8/radosgw-admin.8*
 %{_sbindir}/rcceph-radosgw
+%dir %{_localstatedir}/log/radosgw/
 
 %post radosgw
 /sbin/ldconfig
@@ -534,6 +535,11 @@ fi
 %restart_on_update ceph-radosgw
 %insserv_cleanup
 %endif
+# Package removal cleanup
+if [ "$1" -eq "0" ] ; then
+    rm -rf /var/log/radosgw
+fi
+
 
 #################################################################################
 %if %{with ocf}
index effc2504987f476c50ca66a679016b7b638a909c..d202a8c300cf2fa994e793e86e92cf243cd7f1bc 100644 (file)
@@ -1,2 +1,2 @@
-var/log/ceph
+var/log/radosgw
 var/lib/ceph/radosgw
index de1e01e00188e7fccd42c78fe1799df43439ae5b..1468c4bcdfd90002756083691adaf8fa5cb1b141 100644 (file)
@@ -18,19 +18,11 @@ PREFIX='client.radosgw.'
 # user to run radosgw as (it not specified in ceph.conf)
 DEFAULT_USER='www-data'
 
-# directory to write logs to
-LOGDIR='/var/log/radosgw'
-
 RADOSGW=`which radosgw`
 if [ ! -x "$RADOSGW" ]; then
     exit 0
 fi
 
-# make sure log dir exists
-if [ ! -d "$LOGDIR" ]; then
-    mkdir -p $LOGDIR
-fi
-
 case "$1" in
     start)
         for name in `ceph-conf --list-sections $PREFIX`;
index 017e3f9bc07a394b64f80de1f77bf0f0128f790c..cba99aff18f34b399cc97ba8ee92a0b7a273a0c4 100644 (file)
@@ -20,19 +20,11 @@ PREFIX='client.radosgw.'
 #DEFAULT_USER='www-data'
 DEFAULT_USER='apache'
 
-# directory to write logs to
-LOGDIR='/var/log/radosgw'
-
 RADOSGW=`which radosgw`
 if [ ! -x "$RADOSGW" ]; then
     exit 0
 fi
 
-# make sure log dir exists
-if [ ! -d "$LOGDIR" ]; then
-    mkdir -p $LOGDIR
-fi
-
 case "$1" in
     start)
         echo "Starting radosgw instance(s)..."