From: Joris de Vries Date: Mon, 14 Oct 2013 10:58:12 +0000 (+0200) Subject: Restrict -R usage to when -B (and -b) are set. X-Git-Tag: v1.5.0-rc1~164^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a24c3f3baca8ad219322bf4eb35a7333d4a71354;p=thirdparty%2Frrdtool-1.x.git Restrict -R usage to when -B (and -b) are set. --- diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index d9f63e7b..246d9179 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -3684,6 +3684,7 @@ static int read_options (int argc, char **argv) /* {{{ */ " -p Location of the PID-file.\n" " -b Base directory to change to.\n" " -B Restrict file access to paths within -b \n" + " -R Allow recursive directory creation within -b \n" " -g Do not fork and run in the foreground.\n" " -j Directory in which to create the journal files.\n" " -F Always flush all updates at shutdown\n" @@ -3720,6 +3721,10 @@ static int read_options (int argc, char **argv) /* {{{ */ fprintf(stderr, "WARNING: -B does not make sense without -b!\n" " Consult the rrdcached documentation\n"); + if (config_allow_recursive_mkdir && !config_write_base_only) + fprintf(stderr, "WARNING: -R does not make sense without -B!\n" + " Consult the rrdcached documentation\n"); + if (journal_dir == NULL) config_flush_at_shutdown = 1;