LGTM

On Tue, Jul 15, 2014 at 12:40 PM, 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> For some reason, find does stat the current working directory,
> which, when invoked via cron, may or may not be readable by the
> process (issue 880). Therefore, first change to a directory that
> is definitely accessible to the process; the directory it logs
> into is such a safe place.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  daemons/ganeti-cleaner.in | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/daemons/ganeti-cleaner.in b/daemons/ganeti-cleaner.in
> index 75cf5f0..50972c3 100644
> --- a/daemons/ganeti-cleaner.in
> +++ b/daemons/ganeti-cleaner.in
> @@ -113,6 +113,9 @@ exec >>$LOG_FILE 2>&1
>
>  echo "Cleaner started at $(date)"
>
> +# Switch to a working directory accessible to the cleaner
> +cd $CLEANER_LOG_DIR
> +
>  # Remove old cleaner log files
>  find $CLEANER_LOG_DIR -maxdepth 1 -type f | sort | head -n -$KEEP_LOGS | \
>  xargs -r rm -vf
> --
> 2.0.0.526.g5318336
>
>

Reply via email to