X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fdirplex.c;h=60f0859ddcb86d41560fcd4b75fdbb9d54472e45;hp=d596df09045d78bd86ec24693a3bffda4076abcd;hb=13975be5892675874bea8c86d7d8140f5790e7e6;hpb=060376d428e8693e817ac0eae4710ce222d14e07 diff --git a/src/dirplex.c b/src/dirplex.c index d596df0..60f0859 100644 --- a/src/dirplex.c +++ b/src/dirplex.c @@ -640,7 +640,7 @@ int main(int argc, char **argv) { int c; int nodef; - char *gcf, *lcf; + char *gcf, *lcf, *clcf; struct hthead *req; int fd; @@ -673,8 +673,18 @@ int main(int argc, char **argv) } } if(lcf != NULL) { - if((lconfig = readconfig(lcf)) == NULL) - exit(1); + if(strchr(lcf, '/') == NULL) { + if((clcf = findstdconf(sprintf3("ashd/%s", lcf))) == NULL) { + flog(LOG_ERR, "could not find requested configuration `%s'", lcf); + exit(1); + } + if((lconfig = readconfig(clcf)) == NULL) + exit(1); + free(clcf); + } else { + if((lconfig = readconfig(lcf)) == NULL) + exit(1); + } } if(chdir(argv[optind])) { flog(LOG_ERR, "could not change directory to %s: %s", argv[optind], strerror(errno));