mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
init-ceph: fix (and test!) cleanlogs and cleanalllogs
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
7b4a801fec
commit
7ec0034b65
@ -314,15 +314,15 @@ for name in $what; do
|
||||
cleanlogs)
|
||||
echo removing logs
|
||||
if [ -n "$log_sym_dir" ]; then
|
||||
do_cmd "for f in $log_sym_dir/$name*; do rm -f \`readlink \$f\` ; rm -f \$f ; done ; rm -f $log_dir/$name.*"
|
||||
else
|
||||
do_cmd "rm -f $log_dir/$name.*"
|
||||
do_cmd "for f in $log_sym_dir/$type.$id.*; do rm -f \`readlink \$f\` ; rm -f \$f ; done ; rm -f $log_dir/$type.$id.*"
|
||||
fi
|
||||
[ -n "$log_dir" ] && do_cmd "rm -f $log_dir/$type.$id.*"
|
||||
;;
|
||||
|
||||
cleanalllogs)
|
||||
echo removing all logs
|
||||
do_cmd "rm -f $log_dir/* $log_sym_dir/* || true"
|
||||
[ -n "$log_sym_dir" ] && do_cmd "rm -f $log_sym_dir/*"
|
||||
[ -n "$log_dir" ] && do_cmd "rm -f $log_dir/*"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user