From: Adam Dickmeiss Date: Mon, 3 Jul 1995 12:59:28 +0000 (+0000) Subject: New option for eti: -c dir to chdir before start. X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=44d726c4960ab2aa9914d27a9cb423983701bb85;p=egate.git New option for eti: -c dir to chdir before start. Setting change: gw.max.show defaults to 100. --- diff --git a/kernel/default.res b/kernel/default.res index 4ade197..10c9806 100644 --- a/kernel/default.res +++ b/kernel/default.res @@ -1,5 +1,5 @@ # Email gateway - general kernel resources -# $Id: default.res,v 1.26 1995/07/03 08:20:13 adam Exp $ +# $Id: default.res,v 1.27 1995/07/03 12:59:28 adam Exp $ # # Important directories, programs, etc. gw.reply.mta: /usr/lib/sendmail @@ -7,13 +7,13 @@ gw.reply.tmp.prefix: gwr gw.reply.tmp.dir: /tmp #gw.path: /home/adam/egate/kernel gw.marc.log: marc.log -gw.timeout: 300 +gw.timeout: 30 gw.resultset: 1 gw.persist: 1 gw.max.process: 3 # Retrieval settings -gw.ignore.which: 1 +gw.ignore.which: 0 gw.default.show: 10 gw.max.show: 100 diff --git a/kernel/eti.c b/kernel/eti.c index 48178a0..1aaaf71 100644 --- a/kernel/eti.c +++ b/kernel/eti.c @@ -45,7 +45,11 @@ * Europagate, 1995 * * $Log: eti.c,v $ - * Revision 1.14 1995/05/19 13:25:59 adam + * Revision 1.15 1995/07/03 12:59:28 adam + * New option for eti: -c dir to chdir before start. + * Setting change: gw.max.show defaults to 100. + * + * Revision 1.14 1995/05/19 13:25:59 adam * Bug fixes. Better command line options. * * Revision 1.13 1995/05/16 09:40:41 adam @@ -225,6 +229,7 @@ int main (int argc, char **argv) fprintf (stderr, " -l log Set Log file\n"); fprintf (stderr, " -d Enable debugging log\n"); fprintf (stderr, " -D Enable more debugging log\n"); + fprintf (stderr, " -c dir Change to directory\n"); fprintf (stderr, " -- Precedes kernel options " "(kernel is invoked instead of monitor)\n"); exit (1); @@ -245,6 +250,23 @@ int main (int argc, char **argv) case 'D': gw_log_level (GW_LOG_ALL); break; + case 'c': + if (argv[argno][2]) + { + if (chdir (argv[argno]+2)) + gw_log (GW_LOG_WARN|GW_LOG_ERRNO, module, "chdir"); + } + else if (++argno < argc) + { + if (chdir (argv[argno])) + gw_log (GW_LOG_WARN|GW_LOG_ERRNO, module, "chdir"); + } + else + { + fprintf (stderr, "%s: missing chdir name\n", *argv); + exit (1); + } + break; default: fprintf (stderr, "%s: unknown option `%s'; use -H for help\n", *argv, argv[argno]); diff --git a/kernel/urp.c b/kernel/urp.c index 92a4b36..8ab8af8 100644 --- a/kernel/urp.c +++ b/kernel/urp.c @@ -45,7 +45,11 @@ * Europagate, 1995 * * $Log: urp.c,v $ - * Revision 1.41 1995/07/03 08:20:18 adam + * Revision 1.42 1995/07/03 12:59:29 adam + * New option for eti: -c dir to chdir before start. + * Setting change: gw.max.show defaults to 100. + * + * Revision 1.41 1995/07/03 08:20:18 adam * More help information and better diagnostics. * * Revision 1.40 1995/05/23 08:13:00 adam @@ -570,7 +574,7 @@ static void present (const char *set, int offset, int number, int max_number; char format_str[16]; - max_number = gw_res_int (info.kernel_res, "gw.max.show", 200); + max_number = gw_res_int (info.kernel_res, "gw.max.show", 100); if (number > max_number) number = max_number; gw_log (GW_LOG_DEBUG, KERNEL_LOG, "present in set %s", set);