From: Ian Jackson Date: Mon, 3 May 2010 16:10:52 +0000 (+0100) Subject: Merge branch 'master' of login.chiark.greenend.org.uk:public-git/inn-innduct X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=inn-innduct.git;a=commitdiff_plain;h=8f9c239a1c4116bb35218911c12582380987a842;hp=4f0663ae13490d7c8c987afae579cd414fa88ada Merge branch 'master' of login.chiark.greenend.org.uk:public-git/inn-innduct --- diff --git a/backends/innduct.c b/backends/innduct.c index b6984ea..925b7fc 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -3674,13 +3674,12 @@ int main(int argc, char **argv) { if (!path_run) path_run= innconf->pathrun; - if (!feedfile) { - feedfile= xasprintf("%s/%s",innconf->pathoutgoing,sitename); - } else if (!feedfile[0]) { - badusage("feed filename, if specified, must be nonempty"); - } else if (path_ends_slash(feedfile)) { + if (!feedfile) feedfile= sitename; + if (!feedfile[0]) badusage("feed filename, if specified, must be nonempty"); + if (path_ends_slash(feedfile)) feedfile= xasprintf("%s%s", feedfile, sitename); - } + if (feedfile[0] != '/') + feedfile= xasprintf("%s/%s", innconf->pathoutgoing, feedfile); if (!path_cli) { path_cli_dir= "innduct"; @@ -3703,9 +3702,6 @@ int main(int argc, char **argv) { /* set things up */ - r= chdir(path_run); - if (r) sysdie("could not chdir to pathrun %s", path_run); - path_lock= xasprintf("%s_lock", feedfile); path_flushing= xasprintf("%s_flushing", feedfile); path_defer= xasprintf("%s_defer", feedfile); @@ -3745,6 +3741,9 @@ int main(int argc, char **argv) { self_pid= getpid(); if (self_pid==-1) sysdie("getpid"); + r= chdir(path_run); + if (r) sysdie("could not chdir to pathrun %s", path_run); + statemc_lock(); init_signals(); diff --git a/doc/man/innduct.8 b/doc/man/innduct.8 index 2842050..f8ecbf0 100644 --- a/doc/man/innduct.8 +++ b/doc/man/innduct.8 @@ -76,15 +76,26 @@ feeding by looking in is the actual NNTP feeder program used by nntpsend. .SH GENERAL OPTIONS .TP -.BR \-f | \-\-feedfile= \fIfeedfile\fR -Specifies -.IR feedfile . -If the specified value ends in a +.BR \-f | \-\-feedfile= \fIpath\fR +Specifies the +.I feedfile +to read, and indirectly specifies the paths to +be used for various ancillary files (see FILES, below). +If +.I path +ends in a .B / -it is taken as a directory to use as if it were -.I pathoutgoing -and the actual feed file used is -.IR specified_feedfile / site . +it is taken as a directory to use, and the actual feed file used is +.IR path / site . +If +.I path +does not start with a +.BR / , +it is taken to be relative to +.IR pathoutgoing +from inn.conf. +The default is +.IR site . .TP .BR \-q | \-\-quiet-multiple Makes innduct silently exit (with status 0) if another innduct holds