Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/libexec/httpd/main.c,v rcsdiff: /ftp/cvs/cvsroot/src/libexec/httpd/main.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.5 retrieving revision 1.6 diff -u -p -r1.5 -r1.6 --- src/libexec/httpd/main.c 2011/11/18 09:51:31 1.5 +++ src/libexec/httpd/main.c 2013/10/12 17:24:07 1.6 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.5 2011/11/18 09:51:31 mrg Exp $ */ +/* $NetBSD: main.c,v 1.6 2013/10/12 17:24:07 mbalmer Exp $ */ /* $eterna: main.c,v 1.6 2011/11/18 09:21:15 mrg Exp $ */ /* from: eterna: bozohttpd.c,v 1.159 2009/05/23 02:14:30 mrg Exp */ @@ -79,6 +79,9 @@ usage(bozohttpd_t *httpd, char *progname bozo_warn(httpd, " -c cgibin\t\tenable cgi-bin support in this directory"); #endif +#ifndef NO_LUA_SUPPORT + bozo_warn(httpd, " -L arg script\tadd this Lua script"); +#endif bozo_warn(httpd, " -I port\t\tbind or use on this port"); #ifndef NO_DAEMON_MODE bozo_warn(httpd, " -b\t\t\tbackground and go into daemon mode"); @@ -138,9 +141,22 @@ main(int argc, char **argv) bozo_set_defaults(&httpd, &prefs); while ((c = getopt(argc, argv, - "C:HI:M:P:S:U:VXZ:bc:defhi:np:rst:uv:x:z:")) != -1) { + "C:HI:L:M:P:S:U:VXZ:bc:defhi:np:rst:uv:x:z:")) != -1) { switch(c) { + case 'L': +#ifdef NO_LUA_SUPPORT + bozo_err(&httpd, 1, + "Lua support is not enabled"); + /* NOTREACHED */ +#else + /* make sure there's two argument */ + if (argc - optind < 1) + usage(&httpd, progname); + bozo_add_lua_map(&httpd, optarg, argv[optind]); + optind++; + break; +#endif /* NO_LUA_SUPPORT */ case 'M': #ifdef NO_DYNAMIC_CONTENT bozo_err(&httpd, 1,