X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=kernel%2Feti.c;h=1aaaf71953fe730b0efe877bc655cf44870a483b;hb=44d726c4960ab2aa9914d27a9cb423983701bb85;hp=48178a08f508093151e54647a8e029ebcb309f57;hpb=ec950c9aca0cdb121f344b7a27b6015f8c1c9cab;p=egate.git 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]);