]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Unconditionally chown rados log file. 5233/head
authorThorsten Behrens <tbehrens@suse.com>
Wed, 10 Dec 2014 10:53:43 +0000 (11:53 +0100)
committerNathan Cutler <ncutler@suse.com>
Tue, 14 Jul 2015 10:07:14 +0000 (12:07 +0200)
This fixes bnc#905047 (in a somewhat ad-hoc way). Sadly the log
file gets created from several places, so its existence does not
mean init-radosgw had actually run.

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
(cherry picked from commit 41611ea27a42d6221c418613d24dce34d988f2e6)

src/init-radosgw
src/init-radosgw.sysv

index 5aa658c9f8c4e4bc505f561ae47a53cea385ee75..914d6fddcc1a47a165e6d321a6b5314f74c85215 100644 (file)
@@ -66,8 +66,10 @@ case "$1" in
             fi
 
             log_file=`$RADOSGW -n $name --show-config-value log_file`
-            if [ -n "$log_file" ] && [ ! -e "$log_file" ]; then
-                touch "$log_file"
+            if [ -n "$log_file" ]; then
+                if [ ! -e "$log_file" ]; then
+                    touch "$log_file"
+                fi
                 chown $user $log_file
             fi
 
index fe56939003dffb6a3711e20da97547d010ddb242..102e6409fc8e3f6d81a841be424271ff68cb20d7 100644 (file)
@@ -73,8 +73,10 @@ case "$1" in
             fi
 
             log_file=`$RADOSGW -n $name --show-config-value log_file`
-            if [ -n "$log_file" ] && [ ! -e "$log_file" ]; then
-                touch "$log_file"
+            if [ -n "$log_file" ]; then
+                if [ ! -e "$log_file" ]; then
+                    touch "$log_file"
+                fi
                 chown $user $log_file
             fi